diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-20 08:41:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-20 08:50:48 +0300 |
commit | f889050aea70c2ff3c36c8c8600dd2b02d5e9f91 (patch) | |
tree | 3b6bd799859f8bdd44e4056bf2a7df499618c07f /source/blender/editors/transform/transform_ops.c | |
parent | dc800154b619de64d2de7dae5f81154af343ccd2 (diff) |
Fix T62757: Mirror operator fails for non-modal execution
Unlike most transform operators that use an orientation and values,
Mirror uses the constraint axes to define which axes are mirrored.
Now constraint axes are shown in this case.
Other changes:
- Use 'EXEC_DEFAULT' for mirror menu items.
- Show mirror on local axis when not in edit-mode since this is useful
in object mode too.
- Remove mirror vertex groups since this is in the vertex group menu and
this menu isn't currently used for general symmetry operators which
are currently in other menus.
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 8886a0d49e5..648e616a27c 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -521,6 +521,15 @@ static bool transform_poll_property(const bContext *UNUSED(C), wmOperator *op, c PropertyRNA *prop_con = RNA_struct_find_property(op->ptr, "orient_type"); if (prop_con != NULL && (prop_con != prop)) { if (STRPREFIX(prop_id, "constraint")) { + + /* Special case: show constraint axis if we don't have values, + * needed for mirror operator. */ + if (STREQ(prop_id, "constraint_axis") && + (RNA_struct_find_property(op->ptr, "value") == NULL)) + { + return true; + } + return false; } } |