diff options
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 0a6e0d6b7f5..0347522b8e8 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -829,11 +829,7 @@ static void drawObjectConstraint(TransInfo *t) } } - if (t->flag & T_OBJECT) { - copy_v3_v3(co, td->ob->obmat[3]); - axismtx = td->axismtx; - } - else if (t->flag & T_EDIT) { + if (t->flag & T_EDIT) { mul_v3_m4v3(co, tc->mat, td->center); mul_m3_m3m3(tmp_axismtx, tc->mat3_unit, td->axismtx); @@ -880,21 +876,15 @@ void stopConstraint(TransInfo *t) /*------------------------- MMB Select -------------------------------*/ -void initSelectConstraint(TransInfo *t, bool force_global) +void initSelectConstraint(TransInfo *t) { - short orientation; - if (force_global) { - orientation = V3D_ORIENT_GLOBAL; - } - else { - if (t->orient_curr == 0) { - t->orient_curr = 1; - transform_orientations_current_set(t, t->orient_curr); - } - orientation = t->orient[t->orient_curr].type; + if (t->orient_curr == 0) { + t->orient_curr = 1; + transform_orientations_current_set(t, t->orient_curr); } - setUserConstraint(t, orientation, CON_APPLY | CON_SELECT, ""); + short orientation = t->orient[t->orient_curr].type; + setUserConstraint(t, orientation, CON_APPLY | CON_SELECT, "%s"); setNearestAxis(t); } |