Skip to content

Commit

Permalink
Fix #106: Never rename node tree while updating to avoid crashes with…
Browse files Browse the repository at this point in the history
… asset manager window
  • Loading branch information
ucupumar committed May 4, 2024
1 parent e059bc0 commit f641c72
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 115 deletions.
4 changes: 2 additions & 2 deletions Modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ def check_yp_modifier_linear_nodes(yp):
check_modifiers_trees(layer)
for ch in layer.channels:
check_modifiers_trees(ch)
for mask in layer.masks:
check_modifiers_trees(mask)
#for mask in layer.masks:
# check_modifiers_trees(mask)

def check_modifiers_trees(parent, rearrange=False):
group_tree = parent.id_data
Expand Down
8 changes: 5 additions & 3 deletions common.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ def copy_node_props_(source, dest, extras = []):
#print('FAILED:', prop, val)
pass

def copy_node_props(source, dest, extras = []):
def copy_node_props(source, dest, extras=[]):
# Copy node props
copy_node_props_(source, dest, extras)

Expand Down Expand Up @@ -944,11 +944,13 @@ def copy_node_props(source, dest, extras = []):
for i, inp in enumerate(source.inputs):
socket_name = source.inputs[i].name
if socket_name in dest.inputs and dest.inputs[i].name == socket_name:
dest.inputs[i].default_value = inp.default_value
try: dest.inputs[i].default_value = inp.default_value
except Exception as e: print(e)

# Copy outputs default value
for i, outp in enumerate(source.outputs):
dest.outputs[i].default_value = outp.default_value
try: dest.outputs[i].default_value = outp.default_value
except Exception as e: print(e)

def update_image_editor_image(context, image):
obj = context.object
Expand Down
Loading

0 comments on commit f641c72

Please sign in to comment.