[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14664] trunk/blender/source/blender/nodes /intern/SHD_nodes/SHD_dynamic.c: == PyNodes ==

Willian Padovani Germano wpgermano at gmail.com
Fri May 2 22:41:33 CEST 2008


Revision: 14664
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14664
Author:   ianwill
Date:     2008-05-02 22:41:33 +0200 (Fri, 02 May 2008)

Log Message:
-----------
== 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

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c

Modified: trunk/blender/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c	2008-05-02 17:22:28 UTC (rev 14663)
+++ trunk/blender/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c	2008-05-02 20:41:33 UTC (rev 14664)
@@ -160,11 +160,11 @@
 }
 
 /* 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 @@
 	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;





More information about the Bf-blender-cvs mailing list