Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/armature_update.c')
-rw-r--r--source/blender/blenkernel/intern/armature_update.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index aac9cfdf792..cc1bd9716b1 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -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);
}