|
@@ -585,7 +585,7 @@ def execution_error_cleanup(node, exception, switch_objects = [] ):
|
|
|
|
|
|
|
|
|
|
|
|
|
#execute tree is really slow overall, but still completes 1000s of nodes in only
|
|
#execute tree is really slow overall, but still completes 1000s of nodes in only
|
|
|
-def execute_tree(nodes, base_tree, context):
|
|
|
|
|
|
|
+def execute_tree(nodes, base_tree, context, error_popups = False):
|
|
|
# return
|
|
# return
|
|
|
import bpy
|
|
import bpy
|
|
|
from time import time
|
|
from time import time
|
|
@@ -655,7 +655,10 @@ def execute_tree(nodes, base_tree, context):
|
|
|
if isinstance(ob, bpy.types.Object):
|
|
if isinstance(ob, bpy.types.Object):
|
|
|
select_me.append(ob)
|
|
select_me.append(ob)
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
- raise execution_error_cleanup(n, e,)
|
|
|
|
|
|
|
+ if error_popups:
|
|
|
|
|
+ raise execution_error_cleanup(n, e,)
|
|
|
|
|
+ else:
|
|
|
|
|
+ raise e
|
|
|
n.prepared=True
|
|
n.prepared=True
|
|
|
executed.append(n)
|
|
executed.append(n)
|
|
|
for conn in n.hierarchy_connections:
|
|
for conn in n.hierarchy_connections:
|
|
@@ -674,13 +677,19 @@ def execute_tree(nodes, base_tree, context):
|
|
|
if not n.executed:
|
|
if not n.executed:
|
|
|
n.bExecute(context)
|
|
n.bExecute(context)
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
- raise execution_error_cleanup(n, e,)
|
|
|
|
|
|
|
+ if error_popups:
|
|
|
|
|
+ raise execution_error_cleanup(n, e,)
|
|
|
|
|
+ else:
|
|
|
|
|
+ raise e
|
|
|
|
|
|
|
|
for n in executed:
|
|
for n in executed:
|
|
|
try:
|
|
try:
|
|
|
n.bFinalize(context)
|
|
n.bFinalize(context)
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
- raise execution_error_cleanup(n, e,)
|
|
|
|
|
|
|
+ if error_popups:
|
|
|
|
|
+ raise execution_error_cleanup(n, e,)
|
|
|
|
|
+ else:
|
|
|
|
|
+ raise e
|
|
|
|
|
|
|
|
switch_mode(mode='OBJECT', objects=switch_me)
|
|
switch_mode(mode='OBJECT', objects=switch_me)
|
|
|
for ob in switch_me:
|
|
for ob in switch_me:
|