Fix T63841: armature with X-axis mirror does not mirror bbone scale
Reviewers: brecht Maniphest Tasks: T63841 Differential Revision: https://developer.blender.org/D4733
This commit is contained in:
parent
a14735d11d
commit
5d9d32fd1f
Notes:
blender-bot
2023-02-14 10:11:49 +01:00
Referenced by commit c6f975e3e5
, Better support for (mirrored) bbone scaling in pose mode
Referenced by issue #63841, X-axis mirror do not scale corresponding bone with single bbone scale
|
@ -1325,10 +1325,18 @@ static void createTransPose(TransInfo *t)
|
|||
|
||||
void restoreBones(TransDataContainer *tc)
|
||||
{
|
||||
bArmature *arm = tc->obedit->data;
|
||||
bArmature *arm;
|
||||
BoneInitData *bid = tc->custom.type.data;
|
||||
EditBone *ebo;
|
||||
|
||||
if (tc->obedit) {
|
||||
arm = tc->obedit->data;
|
||||
}
|
||||
else {
|
||||
BLI_assert(tc->poseobj != NULL);
|
||||
arm = tc->poseobj->data;
|
||||
}
|
||||
|
||||
while (bid->bone) {
|
||||
ebo = bid->bone;
|
||||
|
||||
|
|
|
@ -968,6 +968,23 @@ static void recalcData_objects(TransInfo *t)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (t->flag & T_POSE && (t->mode == TFM_BONESIZE)) {
|
||||
/* Handle the exception where for TFM_BONESIZE in edit mode we pretend to be
|
||||
* in pose mode (to use bone orientation matrix),
|
||||
* in that case we have to do mirroring as well. */
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
Object *ob = tc->poseobj;
|
||||
bArmature *arm = ob->data;
|
||||
if (arm->flag & ARM_MIRROR_EDIT) {
|
||||
if (t->state != TRANS_CANCEL) {
|
||||
ED_armature_edit_transform_mirror_update(ob);
|
||||
}
|
||||
else {
|
||||
restoreBones(tc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (t->flag & T_POSE) {
|
||||
GSet *motionpath_updates = BLI_gset_ptr_new("motionpath updates");
|
||||
|
||||
|
|
Loading…
Reference in New Issue