fix preview output in blender 4
1.6.1 - fixed: preview output for Blender 4.0+
This commit is contained in:
@@ -864,8 +864,14 @@ def nodegroup_merge_inputs(ngroup, aa=True):
|
||||
y += offset_y
|
||||
prev = ao
|
||||
|
||||
# create one input and link
|
||||
out = ngroup.outputs.new('NodeSocketColor', ngroup.inputs[0].name)
|
||||
# Create one output and link
|
||||
out_name = 'preview'
|
||||
if bpy.app.version < (4,0,0):
|
||||
# out_name = ngroup.inputs[0].name # name like first inputout_name
|
||||
out = ngroup.outputs.new('NodeSocketColor', out_name)
|
||||
else:
|
||||
# out_name = next((s for s in ngroup.interface.items_tree if s.in_out == 'INPUT')).name # name like first input
|
||||
out = ngroup.interface.new_socket(out_name, in_out='OUTPUT', socket_type='NodeSocketColor')
|
||||
|
||||
## create a merged name as output ??
|
||||
if aa:
|
||||
|
||||
Reference in New Issue
Block a user