瀏覽代碼

fix selection sync error on empty graphs

nodespaghetti 4 周之前
父節點
當前提交
a18b3be4e0
共有 1 個文件被更改,包括 2 次插入 和 0 次删除
  1. 2 0
      timers.py

+ 2 - 0
timers.py

@@ -89,6 +89,8 @@ def timer_update_selection_sync():
                     return SELECTION_POLL_RATE
                 if root_tree.bl_idname != 'MantisTree':
                     return SELECTION_POLL_RATE
+                if len(tree_path[-1].nodes) == 0:
+                    return SELECTION_POLL_RATE # empty graph
                 active_ui_signature = (get_signature_from_space(tree_path[-1].nodes.active, space))
                 for n in tree_path[-1].nodes:
                     if n.bl_idname not in WATCH_FOR_SELECTION: continue