소스 검색

UI: meaningful error for tree update fail

this commit invalidates the tree hash on parse fail,
so that the error message is created by the popup
and sent to the user, and so the user doesn't have to
force update the tree.

these sorts of errors should be rare
Joseph Brandenburg 1 년 전
부모
커밋
80a4f53340
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      base_definitions.py

+ 2 - 1
base_definitions.py

@@ -126,9 +126,10 @@ class MantisTree(NodeTree):
                 if context:
                 if context:
                     self.display_update(context)
                     self.display_update(context)
                 self.tree_valid = True
                 self.tree_valid = True
-            except GraphError as e:
+            except Exception as e:
                 prRed("Failed to update node tree due to error.")
                 prRed("Failed to update node tree due to error.")
                 self.tree_valid = False
                 self.tree_valid = False
+                self.hash='' # unset the hash to mark the tree as un-parsed.
                 raise e
                 raise e
             finally:
             finally:
                 scene.render.use_lock_interface = False
                 scene.render.use_lock_interface = False