[Bf-blender-cvs] [5d99ad3] object_nodes: Use a single geometry subtree also for the graphviz debug function.

Lukas Tönne noreply at git.blender.org
Tue Nov 24 09:44:38 CET 2015


Commit: 5d99ad37ea1f769e3656fb697f8ce9865a057dc4
Author: Lukas Tönne
Date:   Fri Nov 20 10:22:41 2015 +0100
Branches: object_nodes
https://developer.blender.org/rB5d99ad37ea1f769e3656fb697f8ce9865a057dc4

Use a single geometry subtree also for the graphviz debug function.

===================================================================

M	source/blender/makesrna/intern/rna_object_api.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index f212803..9c1d107 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -85,6 +85,7 @@ static EnumPropertyItem space_items[] = {
 #include "DNA_curve_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
+#include "DNA_node_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_view3d_types.h"
 
@@ -461,14 +462,27 @@ static void rna_Object_debug_nodes_graphviz(struct Object *ob, const char *filen
 		return;
 	
 	if (ob->nodetree) {
-		struct BVMEvalGlobals *globals;
-		struct BVMFunction *fn;
+		bNodeTree *geotree = NULL;
+		bNode *node;
 		
-		globals = BVM_globals_create();
-		fn = BVM_gen_modifier_function(globals, ob, ob->nodetree, f);
+		for (node = ob->nodetree->nodes.first; node; node = node->next) {
+			if (STREQ(node->idname, "GeometryNode")) {
+				geotree = (bNodeTree *)node->id;
+				break;
+			}
+		}
 		
-		BVM_function_free(fn);
-		BVM_globals_free(globals);
+		if (geotree) {
+			struct BVMEvalGlobals *globals;
+			struct BVMFunction *fn;
+			
+			globals = BVM_globals_create();
+			
+			fn = BVM_gen_modifier_function(globals, ob, geotree, f);
+			BVM_function_free(fn);
+			
+			BVM_globals_free(globals);
+		}
 	}
 	
 	fclose(f);




More information about the Bf-blender-cvs mailing list