[Bf-blender-cvs] [d4a48fe] depsgraph_refactor: Tweaks to where placeholder ops for geometry eval go

Joshua Leung noreply at git.blender.org
Fri Dec 19 13:56:12 CET 2014


Commit: d4a48fefb47b6a23a1c6a51fddce351fa1b150d9
Author: Joshua Leung
Date:   Sat Dec 20 01:48:08 2014 +1300
Branches: depsgraph_refactor
https://developer.blender.org/rBd4a48fefb47b6a23a1c6a51fddce351fa1b150d9

Tweaks to where placeholder ops for geometry eval go

The original intention here was that operation nodes for geometry would go
on the geometry datablocks. Currently, these are added to the object datablock
instead so that it works with old files.

The main result of this change is a lot of the relation-building code now works
correctly again, since there's only a single node again in the geometry component there.

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

M	source/blender/depsgraph/intern/depsgraph_build_nodes.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index 6f8dc3e..c4b6c06 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -655,7 +655,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 			//Mesh *me = (Mesh *)ob->data;
 			
 			/* evaluation operations */
-			add_operation_node(&ob->id, DEPSNODE_TYPE_GEOMETRY,
+			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_EXEC, function_bind(BKE_mesh_eval_geometry, _1, (Mesh *)obdata),
 			                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
 		}
@@ -669,7 +669,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 			if (mom == ob) {
 				/* metaball evaluation operations */
 				/* NOTE: only the motherball gets evaluated! */
-				add_operation_node(&ob->id, DEPSNODE_TYPE_GEOMETRY,
+				add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 				                   DEPSOP_TYPE_EXEC, function_bind(BKE_mball_eval_geometry, _1, (MetaBall *)obdata),
 				                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
 			}
@@ -681,7 +681,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 		{
 			/* curve evaluation operations */
 			/* - calculate curve geometry (including path) */
-			add_operation_node(&ob->id, DEPSNODE_TYPE_GEOMETRY,
+			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_EXEC, function_bind(BKE_curve_eval_geometry, _1, (Curve *)obdata),
 			                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
 			
@@ -695,7 +695,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 		case OB_SURF: /* Nurbs Surface */
 		{
 			/* nurbs evaluation operations */
-			add_operation_node(&ob->id, DEPSNODE_TYPE_GEOMETRY,
+			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_EXEC, function_bind(BKE_curve_eval_geometry, _1, (Curve *)obdata),
 			                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
 		}
@@ -704,7 +704,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 		case OB_LATTICE: /* Lattice */
 		{
 			/* lattice evaluation operations */
-			add_operation_node(&ob->id, DEPSNODE_TYPE_GEOMETRY,
+			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_EXEC, function_bind(BKE_lattice_eval_geometry, _1, (Lattice *)obdata),
 			                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
 		}
@@ -723,6 +723,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 		for (md = (ModifierData *)ob->modifiers.first; md; md = md->next) {
 //			ModifierTypeInfo *mti = modifierType_getInfo((ModifierType)md->type);
 			
+			// FIXME: this should eventually be on the obdata datablock's geometry?
 			add_operation_node(&ob->id, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_EXEC, function_bind(BKE_object_eval_modifier, _1, scene, ob, md),
 			                   DEG_OPCODE_GEOMETRY_MODIFIER, md->name);




More information about the Bf-blender-cvs mailing list