Fix output file format problem

main
pullusb 2024-04-17 17:03:34 +02:00
parent 58015c11be
commit c6dfcb6655
2 changed files with 10 additions and 3 deletions

View File

@ -135,7 +135,7 @@ class GPEXP_OT_split_to_scene(bpy.types.Operator):
if err:
self.report({'ERROR'}, err)
return {"CANCELLED"}
elif self.mode == 'INDIVIDUAL':
print('split selected object individually in separated scenes')
errors = []

View File

@ -223,11 +223,11 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None):
if groupout.links and groupout.links[0].to_node.type == 'OUTPUT_FILE':
# if already connected to outfile just skip cause user might have customised the name
return
slot_name = f'{lname}/{lname}_'
out_name = f'OUT_{obname}' # or get output from frame
if not out:
out = nodes.get(out_name)
if not out:
# color = (0.2,0.3,0.5)
out = fn.create_node('CompositorNodeOutputFile', tree=node_tree, location=(fn.real_loc(ng)[0]+500, fn.real_loc(ng)[1]+50), width=600) # =(ng.location[0]+600, ng.location[1]+50)
@ -240,6 +240,13 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None):
else:
out.base_path = f'//render/{out_base}'
if out.format.file_format == 'OPEN_EXR_MULTILAYER':
# Direct name in multilayer
slot_name = lname
else:
# base_path/ named_folder/image_####
slot_name = f'{lname}/{lname}_'
## out_input = out.inputs.get(slot_name) # ok for non-numbered outputs
out_input = None