Merge branch 'master' into blender2.8
[blender.git] / source / blender / depsgraph / intern / builder / deg_builder_relations_rig.cc
index dc88d80fed9ba4f6ccc3328b016740f13dfe2fd2..2aff1ca33c7c6e873c1a247267c0cd7d0c0fde06 100644 (file)
@@ -387,16 +387,12 @@ void DepsgraphRelationBuilder::build_rig(Object *object)
                OperationKey bone_pose_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_POSE_PARENT);
                OperationKey bone_ready_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
                OperationKey bone_done_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
-
                pchan->flag &= ~POSE_DONE;
-
-               /* pose init to bone local */
+               /* Pose init to bone local. */
                add_relation(init_key, bone_local_key, "PoseEval Source-Bone Link");
-
-               /* local to pose parenting operation */
+               /* Local to pose parenting operation. */
                add_relation(bone_local_key, bone_pose_key, "Bone Local - PoseSpace Link");
-
-               /* parent relation */
+               /* Parent relation. */
                if (pchan->parent != NULL) {
                        eDepsOperation_Code parent_key_opcode;
 
@@ -411,8 +407,7 @@ void DepsgraphRelationBuilder::build_rig(Object *object)
                        OperationKey parent_key(&object->id, DEG_NODE_TYPE_BONE, pchan->parent->name, parent_key_opcode);
                        add_relation(parent_key, bone_pose_key, "Parent Bone -> Child Bone");
                }
-
-               /* constraints */
+               /* Buil constraints. */
                if (pchan->constraints.first != NULL) {
                        /* constraints stack and constraint dependencies */
                        build_constraints(&object->id, DEG_NODE_TYPE_BONE, pchan->name, &pchan->constraints, &root_map);
@@ -439,6 +434,10 @@ void DepsgraphRelationBuilder::build_rig(Object *object)
 
                /* assume that all bones must be done for the pose to be ready (for deformers) */
                add_relation(bone_done_key, flush_key, "PoseEval Result-Bone Link");
+               /* Custom shape. */
+               if (pchan->custom != NULL) {
+                       build_object(NULL, pchan->custom);
+               }
        }
 }