|
|
@@ -22,6 +22,16 @@ def any_tree_poll(context):
|
|
|
return True
|
|
|
return False
|
|
|
|
|
|
+def tag_mantis_node_for_update(context, node):
|
|
|
+ if any_tree_poll(context):
|
|
|
+ from .base_definitions import get_signature_from_edited_tree
|
|
|
+ node_tree = context.space_data.path[0].node_tree
|
|
|
+ mantis_node = node_tree.parsed_tree.get(
|
|
|
+ get_signature_from_edited_tree(node, context))
|
|
|
+ if mantis_node is None:
|
|
|
+ node_tree.hash = ''
|
|
|
+ else:
|
|
|
+ mantis_node.reset_execution_recursive() # tag this as a change.
|
|
|
#########################################################################3
|
|
|
|
|
|
class MantisGroupNodes(Operator):
|
|
|
@@ -604,7 +614,7 @@ class AddCustomProperty(bpy.types.Operator):
|
|
|
new_prop.description = self.description
|
|
|
# now do the output
|
|
|
n.outputs.new( socktype, self.prop_name)
|
|
|
-
|
|
|
+ tag_mantis_node_for_update(context, n)
|
|
|
return {'FINISHED'}
|
|
|
|
|
|
def main_get_existing_custom_properties(operator, context):
|
|
|
@@ -666,6 +676,7 @@ class EditCustomProperty(bpy.types.Operator):
|
|
|
prop.soft_min = self.soft_min
|
|
|
prop.soft_max = self.soft_max
|
|
|
prop.description = self.description
|
|
|
+ tag_mantis_node_for_update(context, n)
|
|
|
return {'FINISHED'}
|
|
|
else:
|
|
|
self.report({'ERROR_INVALID_INPUT'}, "Cannot edit a property that does not exist.")
|
|
|
@@ -728,6 +739,7 @@ class RemoveCustomProperty(bpy.types.Operator):
|
|
|
raise RuntimeError("This should not happen!")
|
|
|
n.inputs.remove ( n.inputs [i] )
|
|
|
n.outputs.remove( n.outputs[j] )
|
|
|
+ tag_mantis_node_for_update(context, n)
|
|
|
return {'FINISHED'}
|
|
|
|
|
|
|