uasble version pack of feature and fixes
0.2.0 - feat: merge selected viewlayer - feat: mute/unmute all output nodes - feat: cleaning options - feat: renumbering / denumbering
This commit is contained in:
+11
-5
@@ -106,7 +106,7 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None):
|
||||
print('creating socket', vl_name)
|
||||
sockin = ng.inputs.new('NodeSocketColor', vl_name)
|
||||
sockin = ng.inputs[-1]
|
||||
|
||||
|
||||
links.new(rlayer.outputs['Image'], sockin)
|
||||
|
||||
## get nodes from frame
|
||||
@@ -124,8 +124,8 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None):
|
||||
## reorder
|
||||
fn.reorder_inputs(ng)
|
||||
ng.update()
|
||||
|
||||
# CREATE NG outsocket (individual, without taking merge)
|
||||
|
||||
connected = False
|
||||
|
||||
if ng_in.outputs[vl_name].is_linked:
|
||||
@@ -152,6 +152,8 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None):
|
||||
ngroup.links.new(ng_in.outputs[vl_name], aa.inputs[0]) # node_tree
|
||||
ngroup.links.new(aa.outputs[0], ng_out.inputs[vl_name]) # node_tree
|
||||
|
||||
fn.reorganise_NG_nodegroup(ng) # decorative
|
||||
|
||||
# clean outputs
|
||||
for o in reversed(ngroup.outputs):
|
||||
if not o.name in [o.name for o in ngroup.inputs]:
|
||||
@@ -182,12 +184,16 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None):
|
||||
out = nodes.get(out_name)
|
||||
if not out:
|
||||
# color = (0.2,0.3,0.5)
|
||||
out = fn.create_node('CompositorNodeOutputFile', tree=scene.node_tree, location=(fn.real_loc(ng)[0]+600, fn.real_loc(ng)[1]+50), width=600) # =(ng.location[0]+600, ng.location[1]+50)
|
||||
out = fn.create_node('CompositorNodeOutputFile', tree=scene.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)
|
||||
out.name = out_name
|
||||
out.parent = frame
|
||||
out.base_path = f'//render/{bpy.path.clean_name(obname)}'
|
||||
|
||||
out_input = out.inputs.get(slot_name)
|
||||
## out_input = out.inputs.get(slot_name) # ok for non-numbered outputs
|
||||
|
||||
out_input = None
|
||||
out_input = fn.get_numbered_output(out, slot_name)
|
||||
|
||||
if not out_input:
|
||||
out.file_slots.new(slot_name)
|
||||
out_input = out.inputs[-1] # assigning directly above doesn't link afterwards
|
||||
@@ -197,7 +203,7 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None):
|
||||
links.new(groupout, out_input)
|
||||
|
||||
# clean fileout
|
||||
fn.clear_disconnected(out)
|
||||
fn.clear_disconnected(out) # maybe not disconnect ?
|
||||
fn.reorder_fileout(out, ng=ng)
|
||||
|
||||
out.update()
|
||||
|
||||
Reference in New Issue
Block a user