[Bf-blender-cvs] [6a3451fe4ef] blender2.8: Depsgraph: Ensure solver cleanup order

Sergey Sharybin noreply at git.blender.org
Thu Nov 22 16:17:30 CET 2018


Commit: 6a3451fe4ef3de686b40a6701b8c7085844df1a5
Author: Sergey Sharybin
Date:   Thu Nov 22 15:52:17 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB6a3451fe4ef3de686b40a6701b8c7085844df1a5

Depsgraph: Ensure solver cleanup order

Ensure that pose cleanup is never run before all IK solvers are finished.

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

M	source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index 2b4d8d394ab..1abed8bb6a2 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -93,8 +93,15 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
 	                        DEG_NODE_TYPE_EVAL_POSE,
 	                        rootchan->name,
 	                        DEG_OPCODE_POSE_IK_SOLVER);
+	OperationKey pose_cleanup_key(
+	        &object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_CLEANUP);
 	add_relation(pchan_local_key, init_ik_key, "IK Constraint -> Init IK Tree");
 	add_relation(init_ik_key, solver_key, "Init IK -> IK Solver");
+	/* Never cleanup before solver is run. */
+	add_relation(solver_key,
+	             pose_cleanup_key,
+	             "IK Solver -> Cleanup",
+	             DEPSREL_FLAG_GODMODE);
 	/* IK target */
 	/* TODO(sergey): This should get handled as part of the constraint code. */
 	if (data->tar != NULL) {
@@ -254,10 +261,17 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *object,
 	                        DEG_NODE_TYPE_EVAL_POSE,
 	                        rootchan->name,
 	                        DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
+	OperationKey pose_cleanup_key(
+	        &object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_CLEANUP);
 	/* Solver depends on initialization. */
 	add_relation(init_ik_key, solver_key, "Init IK -> IK Solver");
+	/* Never cleanup before solver is run. */
+	add_relation(solver_key, pose_cleanup_key, "IK Solver -> Cleanup");
 	/* Attach owner to IK Solver. */
-	add_relation(transforms_key, solver_key, "Spline IK Solver Owner");
+	add_relation(transforms_key,
+	             solver_key,
+	             "Spline IK Solver Owner",
+	             DEPSREL_FLAG_GODMODE);
 	/* Attach path dependency to solver. */
 	if (data->tar != NULL) {
 		/* TODO(sergey): For until we'll store partial matricies in the



More information about the Bf-blender-cvs mailing list