[Bf-blender-cvs] [31731bc] master: Fix T47734: Rest Position is not working with new Deps

Sergey Sharybin noreply at git.blender.org
Tue Mar 15 12:13:33 CET 2016


Commit: 31731bc834b88ad5d01f2aa3246ab32c058c5d91
Author: Sergey Sharybin
Date:   Tue Mar 15 16:13:00 2016 +0500
Branches: master
https://developer.blender.org/rB31731bc834b88ad5d01f2aa3246ab32c058c5d91

Fix T47734: Rest Position is not working with new Deps

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

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 7457b43..0a5235a 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -778,6 +778,14 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
 		}
 	}
 
+	/* Make sure pose is up-to-date with armature updates. */
+	add_operation_node(&arm->id,
+	                   DEPSNODE_TYPE_PARAMETERS,
+	                   DEPSOP_TYPE_EXEC,
+	                   NULL,
+	                   DEG_OPCODE_PLACEHOLDER,
+	                   "Armature Eval");
+
 	/**
 	 * Pose Rig Graph
 	 * ==============
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
index efeeff2..226991e 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
@@ -1366,6 +1366,8 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
 void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob)
 {
 	/* Armature-Data */
+	bArmature *arm = (bArmature *)ob->data;
+
 	// TODO: selection status?
 
 	/* attach links between pose operations */
@@ -1374,6 +1376,13 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob)
 
 	add_relation(init_key, flush_key, DEPSREL_TYPE_COMPONENT_ORDER, "[Pose Init -> Pose Cleanup]");
 
+	/* Make sure pose is up-to-date with armature updates. */
+	OperationKey armature_key(&arm->id,
+	                          DEPSNODE_TYPE_PARAMETERS,
+	                          DEG_OPCODE_PLACEHOLDER,
+	                          "Armature Eval");
+	add_relation(armature_key, init_key, DEPSREL_TYPE_COMPONENT_ORDER, "Data dependency");
+
 	if (ob->adt && (ob->adt->action || ob->adt->nla_tracks.first)) {
 		ComponentKey animation_key(&ob->id, DEPSNODE_TYPE_ANIMATION);
 		add_relation(animation_key, init_key, DEPSREL_TYPE_OPERATION, "Rig Animation");




More information about the Bf-blender-cvs mailing list