#NEWLINE# def set_render_filename( self , version ) : #NEWLINE# #INDENT# 'sets the render file name\n        ' #NEWLINE# output_filename = '{version.absolute_path}/Outputs/`$OS`/{version.task.project.code}_{version.nice_name}_v{version.version_number:03d}.$F4.exr' #NEWLINE# output_filename = output_filename . format ( version = version ) . replace ( '\\' , '/' ) #NEWLINE# job = hou . getenv ( 'JOB' ) #NEWLINE# while ( '$' in job ) : #NEWLINE# #INDENT# job = os . path . expandvars ( job ) #NEWLINE# #UNINDENT# job_relative_output_file_path = ( '$JOB/%s' % utils . relpath ( job , output_filename , '/' , '..' ) ) #NEWLINE# output_nodes = self . get_output_nodes ( ) #NEWLINE# for output_node in output_nodes : #NEWLINE# #INDENT# if ( output_node . type ( ) . name ( ) == 'ifd' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# output_node . setParms ( { #NEWLINE# #INDENT# 'vm_picture' : str ( job_relative_output_file_path ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# except hou . PermissionError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# output_node . setParms ( { #NEWLINE# #INDENT# 'vm_image_exr_compression' : 'zips' , #NEWLINE# #UNINDENT# } ) #NEWLINE# output_file_full_path = output_node . evalParm ( 'vm_picture' ) #NEWLINE# output_file_path = os . path . dirname ( output_file_full_path ) #NEWLINE# flat_output_file_path = output_file_path #NEWLINE# while ( '$' in flat_output_file_path ) : #NEWLINE# #INDENT# flat_output_file_path = os . path . expandvars ( flat_output_file_path ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# os . makedirs ( self ) #NEWLINE# #UNINDENT# except OSError : #NEWLINE# #INDENT# pass