diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-26 12:17:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-26 13:15:45 +0300 |
commit | 0a87bf67849be91d4b874862815c8ca9e93a4047 (patch) | |
tree | c12214b43e827cb1215ec44b20f03cb08bb427f5 /source/blender/editors/transform/transform.c | |
parent | 13dd8b69f036980b7ad14b692ad5c1edb11745d0 (diff) |
Transform: don't set the user constraint when it's not set
The orientation for the redo panel would be set even when not used,
add an 'unset' orientation which defaults to global.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 487adf29ad8..e10d32716ac 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2171,7 +2171,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) { /* constraint orientation can be global, even if user selects something else * so use the orientation in the constraint if set */ - short orientation = (t->con.mode & CON_APPLY) ? t->con.orientation : t->orientation.user; + short orientation = (t->con.mode & CON_APPLY) ? t->con.orientation : t->orientation.unset; if (orientation == V3D_ORIENT_CUSTOM) { const int orientation_index_custom = BKE_scene_transform_orientation_get_index( @@ -2194,7 +2194,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) RNA_enum_set(op->ptr, "constraint_matrix_orientation", orientation); } } - if (t->con.mode & CON_APPLY) { + if (t->con.mode & CON_APPLY || (t->orientation.unset != V3D_ORIENT_GLOBAL)) { RNA_float_set_array(op->ptr, "constraint_matrix", &t->con.mtx[0][0]); } else { |