Fix T53980: IK influencing REST POSE with New Depsgraph
This commit is contained in:
parent
88e69806b9
commit
fe82a09f89
Notes:
blender-bot
2023-02-14 06:13:31 +01:00
Referenced by issue #53980, IK influencing REST POSE with New Depsgraph
|
@ -587,13 +587,15 @@ void BKE_pose_eval_init_ik(EvaluationContext *UNUSED(eval_ctx),
|
|||
Object *ob,
|
||||
bPose *UNUSED(pose))
|
||||
{
|
||||
float ctime = BKE_scene_frame_get(scene); /* not accurate... */
|
||||
|
||||
DEBUG_PRINT("%s on %s\n", __func__, ob->id.name);
|
||||
|
||||
BLI_assert(ob->type == OB_ARMATURE);
|
||||
const float ctime = BKE_scene_frame_get(scene); /* not accurate... */
|
||||
bArmature *arm = (bArmature *)ob->data;
|
||||
if (arm->flag & ARM_RESTPOS) {
|
||||
return;
|
||||
}
|
||||
/* 2a. construct the IK tree (standard IK) */
|
||||
BIK_initialize_tree(scene, ob, ctime);
|
||||
|
||||
/* 2b. construct the Spline IK trees
|
||||
* - this is not integrated as an IK plugin, since it should be able
|
||||
* to function in conjunction with standard IK
|
||||
|
@ -606,9 +608,9 @@ void BKE_pose_eval_bone(EvaluationContext *UNUSED(eval_ctx),
|
|||
Object *ob,
|
||||
bPoseChannel *pchan)
|
||||
{
|
||||
bArmature *arm = (bArmature *)ob->data;
|
||||
DEBUG_PRINT("%s on %s pchan %s\n", __func__, ob->id.name, pchan->name);
|
||||
BLI_assert(ob->type == OB_ARMATURE);
|
||||
bArmature *arm = (bArmature *)ob->data;
|
||||
if (arm->edbo || (arm->flag & ARM_RESTPOS)) {
|
||||
Bone *bone = pchan->bone;
|
||||
if (bone) {
|
||||
|
@ -673,8 +675,13 @@ void BKE_pose_iktree_evaluate(EvaluationContext *UNUSED(eval_ctx),
|
|||
Object *ob,
|
||||
bPoseChannel *rootchan)
|
||||
{
|
||||
float ctime = BKE_scene_frame_get(scene); /* not accurate... */
|
||||
DEBUG_PRINT("%s on %s pchan %s\n", __func__, ob->id.name, rootchan->name);
|
||||
BLI_assert(ob->type == OB_ARMATURE);
|
||||
const float ctime = BKE_scene_frame_get(scene); /* not accurate... */
|
||||
bArmature *arm = (bArmature *)ob->data;
|
||||
if (arm->flag & ARM_RESTPOS) {
|
||||
return;
|
||||
}
|
||||
BIK_execute_tree(scene, ob, rootchan, ctime);
|
||||
}
|
||||
|
||||
|
@ -683,8 +690,13 @@ void BKE_pose_splineik_evaluate(EvaluationContext *UNUSED(eval_ctx),
|
|||
Object *ob,
|
||||
bPoseChannel *rootchan)
|
||||
{
|
||||
float ctime = BKE_scene_frame_get(scene); /* not accurate... */
|
||||
DEBUG_PRINT("%s on %s pchan %s\n", __func__, ob->id.name, rootchan->name);
|
||||
BLI_assert(ob->type == OB_ARMATURE);
|
||||
const float ctime = BKE_scene_frame_get(scene); /* not accurate... */
|
||||
bArmature *arm = (bArmature *)ob->data;
|
||||
if (arm->flag & ARM_RESTPOS) {
|
||||
return;
|
||||
}
|
||||
BKE_splineik_execute_tree(scene, ob, rootchan, ctime);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue