Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
| Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | |||||
| void DepsgraphNodeBuilder::build_splineik_pose(Object *object, | void DepsgraphNodeBuilder::build_splineik_pose(Object *object, | ||||
| bPoseChannel *pchan, | bPoseChannel *pchan, | ||||
| bConstraint *con) | bConstraint *con) | ||||
| { | { | ||||
| bSplineIKConstraint *data = (bSplineIKConstraint *)con->data; | bSplineIKConstraint *data = (bSplineIKConstraint *)con->data; | ||||
| /* Find the chain's root. */ | /* Find the chain's root. */ | ||||
| bPoseChannel *rootchan = BKE_armature_splineik_solver_find_root(pchan, data); | bPoseChannel *rootchan = BKE_armature_splineik_solver_find_root(pchan, data); | ||||
| if (rootchan == nullptr) { | |||||
sybren: When would this happen? | |||||
lichtwerkAuthorUnsubmitted Done Inline ActionsThis was a brainless copy/paste relict from regular IK lichtwerk: This was a brainless copy/paste relict from regular IK
(there it actually makes sense, see… | |||||
| return; | |||||
| } | |||||
| if (has_operation_node( | |||||
sybrenUnsubmitted Done Inline ActionsThis makese sense. sybren: This makese sense. | |||||
| &object->id, NodeType::EVAL_POSE, rootchan->name, OperationCode::POSE_SPLINE_IK_SOLVER)) { | |||||
| return; | |||||
| } | |||||
| /* Operation node for evaluating/running Spline IK Solver. | /* Operation node for evaluating/running Spline IK Solver. | ||||
| * Store the "root bone" of this chain in the solver, so it knows where to | * Store the "root bone" of this chain in the solver, so it knows where to | ||||
| * start. */ | * start. */ | ||||
| int rootchan_index = BLI_findindex(&object->pose->chanbase, rootchan); | int rootchan_index = BLI_findindex(&object->pose->chanbase, rootchan); | ||||
| BLI_assert(rootchan_index != -1); | BLI_assert(rootchan_index != -1); | ||||
| add_operation_node(&object->id, | add_operation_node(&object->id, | ||||
| NodeType::EVAL_POSE, | NodeType::EVAL_POSE, | ||||
| ▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines | |||||
When would this happen?