浏览代码

Tool: Added Force Display Update operator for testing

Joseph Brandenburg 9 月之前
父节点
当前提交
84c4fde883
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      ops_nodegroup.py

+ 16 - 0
ops_nodegroup.py

@@ -14,6 +14,7 @@ def TellClasses():
         ExecuteNodeTree,
         # CreateMetaGroup,
         QueryNodeSockets,
+        ForceDisplayUpdate,
         CleanUpNodeGraph,
         MantisMuteNode,
         MantisVisualizeOutput,
@@ -306,6 +307,21 @@ class QueryNodeSockets(Operator):
         return {"FINISHED"}
 
 
+class ForceDisplayUpdate(Operator):
+    """Utility Operator for querying the data in a socket"""
+    bl_idname = "mantis.force_display_update"
+    bl_label = "Force Mantis Display Update"
+
+    @classmethod
+    def poll(cls, context):
+        return (mantis_tree_poll_op(context))
+
+    def execute(self, context):
+        base_tree = bpy.context.space_data.path[0].node_tree
+        base_tree.display_update(context)
+        return {"FINISHED"}
+
+
 class CleanUpNodeGraph(bpy.types.Operator):
     """Clean Up Node Graph"""
     bl_idname = "mantis.nodes_cleanup"