Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
| Show First 20 Lines • Show All 254 Lines • ▼ Show 20 Lines | void DepsgraphRelationBuilder::build_splineik_pose(Object *object, | ||||
| add_relation(solver_key, pose_cleanup_key, "IK Solver -> Cleanup"); | add_relation(solver_key, pose_cleanup_key, "IK Solver -> Cleanup"); | ||||
| /* Attach owner to IK Solver. */ | /* Attach owner to IK Solver. */ | ||||
| add_relation(transforms_key, | add_relation(transforms_key, | ||||
| solver_key, | solver_key, | ||||
| "Spline IK Solver Owner", | "Spline IK Solver Owner", | ||||
| RELATION_FLAG_GODMODE); | RELATION_FLAG_GODMODE); | ||||
| /* Attach path dependency to solver. */ | /* Attach path dependency to solver. */ | ||||
| if (data->tar != NULL) { | if (data->tar != NULL) { | ||||
| /* TODO(sergey): For until we'll store partial matricies in the | |||||
| * depsgraph, we create dependency between target object and pose eval | |||||
| * component. See IK pose for a bit more information. */ | |||||
| /* TODO: the bigggest point here is that we need the curve PATH and not | |||||
| * just the general geometry. */ | |||||
| ComponentKey target_key(&data->tar->id, NodeType::GEOMETRY); | ComponentKey target_key(&data->tar->id, NodeType::GEOMETRY); | ||||
| ComponentKey pose_key(&object->id, NodeType::EVAL_POSE); | add_relation(target_key, init_ik_key, "Curve.Path -> Spline IK"); | ||||
| add_relation(target_key, pose_key, "Curve.Path -> Spline IK"); | |||||
| } | } | ||||
| pchan->flag |= POSE_DONE; | pchan->flag |= POSE_DONE; | ||||
| OperationKey final_transforms_key( | OperationKey final_transforms_key( | ||||
| &object->id, NodeType::BONE, pchan->name, OperationCode::BONE_DONE); | &object->id, NodeType::BONE, pchan->name, OperationCode::BONE_DONE); | ||||
| add_relation(solver_key, final_transforms_key, "Spline IK Result"); | add_relation(solver_key, final_transforms_key, "Spline IK Result"); | ||||
| root_map->add_bone(pchan->name, rootchan->name); | root_map->add_bone(pchan->name, rootchan->name); | ||||
| /* Walk to the chain's root/ */ | /* Walk to the chain's root/ */ | ||||
| int segcount = 0; | int segcount = 0; | ||||
| ▲ Show 20 Lines • Show All 333 Lines • Show Last 20 Lines | |||||