[Bf-blender-cvs] [473d462] master: Fix T44980: Shapekeys with driver not working with new depsgraph in 2.75 test build

Sergey Sharybin noreply at git.blender.org
Mon Jun 15 18:50:54 CEST 2015


Commit: 473d46263bf62810e1a3fd17acfb80e66ebaec5e
Author: Sergey Sharybin
Date:   Mon Jun 15 18:50:09 2015 +0200
Branches: master
https://developer.blender.org/rB473d46263bf62810e1a3fd17acfb80e66ebaec5e

Fix T44980: Shapekeys with driver not working with new depsgraph in 2.75 test build

Was just a few missing dependencies.

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

M	source/blender/depsgraph/intern/depsgraph_build_nodes.cc
M	source/blender/depsgraph/intern/depsgraph_build_relations.cc

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index c9d2ed3..31e32ac 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -897,6 +897,9 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *ob)
 void DepsgraphNodeBuilder::build_shapekeys(Key *key)
 {
 	build_animdata(&key->id);
+
+	add_operation_node(&key->id, DEPSNODE_TYPE_GEOMETRY, DEPSOP_TYPE_EXEC, NULL,
+	                   DEG_OPCODE_PLACEHOLDER, "Shapekey Eval");
 }
 
 /* ObData Geometry Evaluation */
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
index b59d845..20c059d 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
@@ -425,6 +425,13 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
 				build_camera(ob);
 				break;
 		}
+
+		Key *key =BKE_key_from_object(ob);
+		if (key != NULL) {
+			ComponentKey geometry_key((ID*)ob->data, DEPSNODE_TYPE_GEOMETRY);
+			ComponentKey key_key(&key->id, DEPSNODE_TYPE_GEOMETRY);
+			add_relation(key_key, geometry_key, DEPSREL_TYPE_GEOMETRY_EVAL, "Shapekeys");
+		}
 	}
 
 	/* particle systems */
@@ -811,6 +818,10 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
 			OperationKey local_transform_key(id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
 			add_relation(driver_key, local_transform_key, DEPSREL_TYPE_OPERATION, "[Driver -> Transform]");
 		}
+		else if (GS(id->name) == ID_KE) {
+			ComponentKey geometry_key(id, DEPSNODE_TYPE_GEOMETRY);
+			add_relation(driver_key, geometry_key, DEPSREL_TYPE_GEOMETRY_EVAL, "[Driver -> Shapekey Geometry]");
+		}
 	}
 
 	/* ensure that affected prop's update callbacks will be triggered once done */




More information about the Bf-blender-cvs mailing list