diff --git a/core/nodeslicer/sockets.py b/core/nodeslicer/sockets.py index 2a2fcbd..f132449 100644 --- a/core/nodeslicer/sockets.py +++ b/core/nodeslicer/sockets.py @@ -89,6 +89,7 @@ class SLICESOCK_VectorRotation_Common(InputNodeSocket): value: bpy.props.FloatVectorProperty(name="Vector", size=3, default=(0.0, 0.0, 0.0), subtype='EULER', update=notify_tree_changed) # pyright: ignore[reportInvalidTypeForm] bl_color = (0.39, 0.39, 0.78, 1.0) + @register_class class SLICESOCK_VectorRotation(SLICESOCK_VectorRotation_Common): ... @register_class diff --git a/core/nodeslicer/tree.py b/core/nodeslicer/tree.py index d5771b3..b30daed 100644 --- a/core/nodeslicer/tree.py +++ b/core/nodeslicer/tree.py @@ -45,6 +45,19 @@ def notify_tree_changed(self, context): global _tree_changed _tree_changed = True + # Trigger node update if it exists + node = None + if isinstance(self, bpy.types.Node): + node = self + elif isinstance(self, bpy.types.NodeSocket): + node = self.node + + if node and hasattr(node, "update"): + try: + node.update() + except Exception as e: + print(f"Error updating node {node.name}: {e}") + @persistent def depsgraph_update_handler(scene, depsgraph): global _is_updating, _tree_changed