diff options
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index a1ed66c96a3..61bbe722d71 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -524,8 +524,19 @@ short ED_transform_calc_orientation_from_type_ex(const Scene *scene, { switch (orientation_index) { case V3D_ORIENT_GIMBAL: { - if (ob && gimbal_axis(ob, r_mat)) { - break; + + if (ob) { + if (ob->mode & OB_MODE_POSE) { + const bPoseChannel *pchan = BKE_pose_channel_active(ob); + if (pchan && gimbal_axis_pose(ob, pchan, r_mat)) { + break; + } + } + else { + if (gimbal_axis_object(ob, r_mat)) { + break; + } + } } /* If not gimbal, fall through to normal. */ ATTR_FALLTHROUGH; |