diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2008-05-03 00:41:33 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2008-05-03 00:41:33 +0400 |
commit | 5ad6b3f8dda50f86a5441b48539643a00a8914b8 (patch) | |
tree | 75f7e1fa2cd95ba01bc658ce8ae7641f251a6c18 /source/blender/nodes/intern/SHD_nodes | |
parent | e7a106625c5c7d7d51ae9349055ca656d48c6f54 (diff) |
== PyNodes ==
More bug fixing, reports by Juho (bebraw) Vepsalainen (thanks!)
#10340: a recent fix I made broke handling of pynodes with buggy scripts when loaded from a .blend. (This may have been the reason for #10341, too, caused by saving buggy typeinfo.)
http://projects.blender.org/tracker/?func=detail&atid=125&aid=10340&group_id=9
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes')
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c b/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c index 37bbb68ba03..78f780c43b1 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c @@ -160,11 +160,11 @@ static void node_dynamic_free_storage_cb(bNode *node) } /* Disable pynode when its script fails */ -/*static void node_dynamic_disable(bNode *node) +static void node_dynamic_disable(bNode *node) { node->custom1 = 0; node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ERROR); -}*/ +} /* Disable all pynodes using the given text (script) id */ static void node_dynamic_disable_all_by_id(ID *id) @@ -401,7 +401,11 @@ static int node_dynamic_parse(struct bNode *node) MEM_freeN(buf); if (!pyresult) { + if (BTST(node->custom1, NODE_DYNAMIC_LOADED)) { + node_dynamic_disable(node); + } else { node_dynamic_disable_all_by_id(node->id); + } node_dynamic_pyerror_print(node); PyGILState_Release(gilstate); return -1; |