Fix T53054: Parentless bone + IK crashes
This commit is contained in:
parent
8550c2b922
commit
6d8f63a834
Notes:
blender-bot
2023-02-14 06:28:56 +01:00
Referenced by issue #53683, 2.79a release Referenced by issue #53054, Bones No Parent+Not Tail = Crash
|
@ -79,6 +79,9 @@ void DepsgraphNodeBuilder::build_ik_pose(Scene *scene, Object *ob, bPoseChannel
|
|||
|
||||
/* Find the chain's root. */
|
||||
bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
|
||||
if (rootchan == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (has_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
|
||||
DEG_OPCODE_POSE_IK_SOLVER))
|
||||
|
|
|
@ -83,6 +83,9 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
|
|||
* - see notes on direction of rel below...
|
||||
*/
|
||||
bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
|
||||
if (rootchan == NULL) {
|
||||
return;
|
||||
}
|
||||
OperationKey pchan_local_key(&ob->id, DEG_NODE_TYPE_BONE,
|
||||
pchan->name, DEG_OPCODE_BONE_LOCAL);
|
||||
OperationKey init_ik_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT_IK);
|
||||
|
|
Loading…
Reference in New Issue