diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-06-23 01:06:04 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-06-23 01:06:24 +0300 |
commit | 51bf04383aa0300b60bca71c5ce388e338751932 (patch) | |
tree | d90a6fa87833aef2f3f8af8147520a7fdc035e98 /source/blender/editors/transform/transform_convert_armature.c | |
parent | 2fdca5bd1981cddad16715598b4892a2c6099e2f (diff) |
Fix T78045: CTL-ALT-S does nothing in pose mode and crashes when called from the menu
Diffstat (limited to 'source/blender/editors/transform/transform_convert_armature.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert_armature.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index 75b51b3d2c4..ac953774d78 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -667,20 +667,16 @@ static void add_pose_transdata( mul_m3_m3m3(td->axismtx, omat, pmat); normalize_m3(td->axismtx); - if (ELEM(t->mode, TFM_BONESIZE, TFM_BONE_ENVELOPE_DIST)) { - bArmature *arm = tc->poseobj->data; - - if ((t->mode == TFM_BONE_ENVELOPE_DIST) || (arm->drawtype == ARM_ENVELOPE)) { - td->loc = NULL; - td->val = &bone->dist; - td->ival = bone->dist; - } - else { - // abusive storage of scale in the loc pointer :) - td->loc = &bone->xwidth; - copy_v3_v3(td->iloc, td->loc); - td->val = NULL; - } + if (t->mode == TFM_BONE_ENVELOPE_DIST) { + td->loc = NULL; + td->val = &bone->dist; + td->ival = bone->dist; + } + else if (t->mode == TFM_BONESIZE) { + // abusive storage of scale in the loc pointer :) + td->loc = &bone->xwidth; + copy_v3_v3(td->iloc, td->loc); + td->val = NULL; } /* in this case we can do target-less IK grabbing */ @@ -988,7 +984,7 @@ void createTransArmatureVerts(TransInfo *t) } else if (ELEM(t->mode, TFM_BONESIZE, TFM_BONE_ENVELOPE_DIST)) { if (ebo->flag & BONE_SELECTED) { - if ((t->mode == TFM_BONE_ENVELOPE_DIST) || (arm->drawtype == ARM_ENVELOPE)) { + if (t->mode == TFM_BONE_ENVELOPE_DIST) { td->loc = NULL; td->val = &ebo->dist; td->ival = ebo->dist; |