def set_render_filename(self, version):
        """sets the render file name
        """
        output_filename = \
            '{version.absolute_path}/Outputs/`$OS`/' \
            '{version.task.project.code}_{version.nice_name}_' \
            'v{version.version_number:03d}.$F4.exr'

        output_filename = \
            output_filename.format(version=version).replace('\\', '/')

        # compute a $JOB relative file path
        # which is much safer if the file is going to be render in multiple OSes
        # $HIP = the current asset path
        # $JOB = the current sequence path
        #hip = self._asset.path
        #hip = hou.getenv("HIP")
        job = hou.getenv("JOB")
        # eliminate environment vars
        while "$" in job:
            job = os.path.expandvars(job)

        job_relative_output_file_path = \
            "$JOB/%s" % utils.relpath(job, output_filename, "/", "..")

        output_nodes = self.get_output_nodes()
        for output_node in output_nodes:
            # get only the ifd nodes for now
            if output_node.type().name() == 'ifd':
                # set the file name
                try:
                    output_node.setParms(
                        {'vm_picture': str(job_relative_output_file_path)}
                    )
                except hou.PermissionError:
                    # node is locked
                    pass

                # set the compression to zips (zip, single scanline)
                output_node.setParms({"vm_image_exr_compression": "zips"})

                # also create the folders
                output_file_full_path = output_node.evalParm('vm_picture')
                output_file_path = os.path.dirname(output_file_full_path)

                flat_output_file_path = output_file_path
                while "$" in flat_output_file_path:
                    flat_output_file_path = os.path.expandvars(
                        flat_output_file_path
                    )

                try:
                    os.makedirs(flat_output_file_path)
                except __HOLE__:
                    # dirs exists
                    pass
dataset/ETHPy150Open eoyilmaz/anima/anima/env/houdini.py/Houdini.set_render_filename