diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 4ba87eb8c39..894145c9e9d 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -576,7 +576,15 @@ void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]) void setAxisMatrixConstraint(TransInfo *t, int mode, const char text[]) { if (t->total == 1) { - setConstraint(t, t->data->axismtx, mode, text); + float axismtx[3][3]; + if (t->flag & T_EDIT) { + mul_m3_m3m3(axismtx, t->obedit_mat, t->data->axismtx); + } + else { + copy_m3_m3(axismtx, t->data->axismtx); + } + + setConstraint(t, axismtx, mode, text); } else { BLI_strncpy(t->con.text + 1, text, sizeof(t->con.text) - 1); |