diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-21 13:52:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-21 13:59:15 +0300 |
commit | 1bfbfa281046b9d600a1604794fce3aadd7f5cf7 (patch) | |
tree | f2d818a9ab7ebb4a5d08efa2cddd51a29c83751d /source/blender/editors/transform/transform_generics.c | |
parent | 510810c72d11ccb3b1b4b69e8f3e3a3189877862 (diff) |
Transform: remove constraints from the redo panel
Constraint options had confusing behavior:
- When non were pressed, the orientation was ignored.
- When any were pressed, the orientation was used,
but only unconstrained axed could be adjusted.
Now constraining is only used for modal execution
so there is no need to show these in the interface.
When an orientation is selected, the XYZ values always transform
using that space.
Note, transform system should be refactored to support different
orientations w/o having to use constraints.
Addresses T57204
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index d74cd72f649..0bdd18793f4 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1513,11 +1513,19 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_matrix")) && - RNA_property_is_set(op->ptr, prop))) + RNA_property_is_set(op->ptr, prop)) && + ((t->flag & T_MODAL) || + /* When using redo, don't use the the custom constraint matrix + * if the user selects a different orientation. */ + (RNA_enum_get(op->ptr, "constraint_orientation") == + RNA_enum_get(op->ptr, "constraint_matrix_orientation")))) { RNA_property_float_get_array(op->ptr, prop, &t->spacemtx[0][0]); t->orientation.user = V3D_ORIENT_CUSTOM_MATRIX; t->orientation.custom = 0; + if (t->flag & T_MODAL) { + RNA_enum_set(op->ptr, "constraint_matrix_orientation", RNA_enum_get(op->ptr, "constraint_orientation")); + } } else if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) && RNA_property_is_set(op->ptr, prop))) |