소스 검색

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