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/editors/transform/transform_convert_armature.c')
-rw-r--r--source/blender/editors/transform/transform_convert_armature.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c
index 9885c8fc3a6..5cc6a62894d 100644
--- a/source/blender/editors/transform/transform_convert_armature.c
+++ b/source/blender/editors/transform/transform_convert_armature.c
@@ -349,6 +349,10 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
}
}
}
+
+ /* Return early (as in: don't actually create a temporary constraint here), since adding
+ * will take place later in add_pose_transdata() for targetless constraints. */
+ return 0;
}
}
@@ -702,10 +706,14 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
/* Add a temporary auto IK constraint here, as we will only temporarily active this
* targetless bone during transform. (Targetless IK constraints are treated as if they are
- * disabled unless they are transformed). */
- add_temporary_ik_constraint(pchan, data);
- Main *bmain = CTX_data_main(t->context);
- update_deg_with_temporary_ik(bmain, ob);
+ * disabled unless they are transformed).
+ * Only do this for targetless IK though, AutoIK already added a constraint in
+ * pose_grab_with_ik_add() beforehand. */
+ if ((data->flag & CONSTRAINT_IK_TEMP) == 0) {
+ add_temporary_ik_constraint(pchan, data);
+ Main *bmain = CTX_data_main(t->context);
+ update_deg_with_temporary_ik(bmain, ob);
+ }
/* only object matrix correction */
copy_m3_m3(td->mtx, omat);
@@ -1350,10 +1358,14 @@ static void pose_transform_mirror_update(TransInfo *t, TransDataContainer *tc, O
data->flag |= CONSTRAINT_IK_AUTO;
/* Add a temporary auto IK constraint here, as we will only temporarily active this
* target-less bone during transform. (Target-less IK constraints are treated as if they are
- * disabled unless they are transformed) */
- add_temporary_ik_constraint(pchan, data);
- Main *bmain = CTX_data_main(t->context);
- update_deg_with_temporary_ik(bmain, ob);
+ * disabled unless they are transformed).
+ * Only do this for targetless IK though, AutoIK already added a constraint in
+ * pose_grab_with_ik_add() beforehand. */
+ if ((data->flag & CONSTRAINT_IK_TEMP) == 0) {
+ add_temporary_ik_constraint(pchan, data);
+ Main *bmain = CTX_data_main(t->context);
+ update_deg_with_temporary_ik(bmain, ob);
+ }
}
if (pid) {