diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-07-15 18:28:06 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-07-15 18:30:12 +0300 |
commit | ee55ac19dc884dfb84f2a39928f7ab2898f8a712 (patch) | |
tree | 22232e6e6e49d9b6618e7fef90e45b4ef6bb71ad /source | |
parent | daff18dd286920c0636329c704c3758f90be0013 (diff) |
Fix T66870: AutoIK-Len stops working after releasing the mouse
The code didn't check if we should initialize the transform auto IK parameters.
Cleaned up the code a bit too.
Reviewed By: Brecht
Differential Revision: http://developer.blender.org/D5260
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index be7ea752fec..f7158244cc7 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1289,7 +1289,6 @@ static void createTransPose(TransInfo *t) bPose *pose = ob->pose; bArmature *arm; - short ik_on = 0; /* check validity of state */ arm = BKE_armature_from_object(tc->poseobj); @@ -1315,8 +1314,7 @@ static void createTransPose(TransInfo *t) /* do we need to add temporal IK chains? */ if ((pose->flag & POSE_AUTO_IK) && t->mode == TFM_TRANSLATION) { - ik_on = pose_grab_with_ik(bmain, ob); - if (ik_on) { + if (pose_grab_with_ik(bmain, ob)) { t->flag |= T_AUTOIK; has_translate_rotate[0] = true; } @@ -1359,7 +1357,6 @@ static void createTransPose(TransInfo *t) Object *ob = tc->poseobj; TransData *td; TransDataExtension *tdx; - short ik_on = 0; int i; PoseInitData_Mirror *pid = tc->custom.type.data; @@ -1407,7 +1404,7 @@ static void createTransPose(TransInfo *t) } /* initialize initial auto=ik chainlen's? */ - if (ik_on) { + if (t->flag & T_AUTOIK) { transform_autoik_update(t, 0); } } |