Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-16 09:35:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-16 09:35:44 +0400
commitfcc4251c07c6bc4ca5a121d224d40d3655af9a03 (patch)
treebbb12803bbf891f6b0e22e61a021c378d557fba1 /source
parent72abfbfc9514ff18e5d96e17ef42cc6777b8cf5a (diff)
resolve [#33374] Extrude and mirror editing
mirror editing option was only added to extrude so mirror editing would always be disabled. the option is now hidden to avoid confusing users.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/include/ED_transform.h2
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c9
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c3
-rw-r--r--source/blender/editors/transform/transform_ops.c14
4 files changed, 18 insertions, 10 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index dd6c4fea6a0..423613fb780 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -137,6 +137,7 @@ void BIF_TransformSetUndo(const char *str);
/* to be able to add operator properties to other operators */
#define P_MIRROR (1 << 0)
+#define P_MIRROR_DUMMY (P_MIRROR | (1 << 9))
#define P_PROPORTIONAL (1 << 1)
#define P_AXIS (1 << 2)
#define P_SNAP (1 << 3)
@@ -145,6 +146,7 @@ void BIF_TransformSetUndo(const char *str);
#define P_CONSTRAINT (1 << 6)
#define P_OPTIONS (1 << 7)
#define P_CORRECT_UV (1 << 8)
+#define P_NO_DEFAULTS (1 << 10)
void Transform_Properties(struct wmOperatorType *ot, int flags);
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index cccf08cfe1a..65c528dbe03 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -46,6 +46,7 @@
#include "ED_mesh.h"
#include "ED_screen.h"
+#include "ED_transform.h"
#include "ED_view3d.h"
#include "mesh_intern.h" /* own include */
@@ -429,7 +430,7 @@ void MESH_OT_extrude_region(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+ Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
}
static int edbm_extrude_verts_exec(bContext *C, wmOperator *op)
@@ -460,7 +461,7 @@ void MESH_OT_extrude_verts_indiv(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
- RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+ Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
}
static int edbm_extrude_edges_exec(bContext *C, wmOperator *op)
@@ -491,7 +492,7 @@ void MESH_OT_extrude_edges_indiv(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
- RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+ Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
}
static int edbm_extrude_faces_exec(bContext *C, wmOperator *op)
@@ -521,7 +522,7 @@ void MESH_OT_extrude_faces_indiv(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+ Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
}
/* *************** add-click-mesh (extrude) operator ************** */
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index c9e248e575d..c027c1bbcd1 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -1055,7 +1055,6 @@ void MESH_OT_rip(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
- Transform_Properties(ot, P_PROPORTIONAL);
- RNA_def_boolean(ot->srna, "mirror", false, "Mirror Editing", "");
+ Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR_DUMMY);
RNA_def_boolean(ot->srna, "use_fill", false, "Fill", "Fill the ripped region");
}
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 1b9baa82cde..c0adf065f57 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -500,7 +500,11 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
}
if (flags & P_MIRROR) {
- RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+ prop = RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
+ if (flags & P_MIRROR_DUMMY) {
+ /* only used so macros can disable this option */
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ }
}
@@ -539,9 +543,11 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
RNA_def_boolean(ot->srna, "correct_uv", 0, "Correct UVs", "Correct UV coordinates when transforming");
}
- // Add confirm method all the time. At the end because it's not really that important and should be hidden only in log, not in keymap edit
- /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button");
- //RNA_def_property_flag(prop, PROP_HIDDEN);
+ if ((flags & P_NO_DEFAULTS) == 0) {
+ // Add confirm method all the time. At the end because it's not really that important and should be hidden only in log, not in keymap edit
+ /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button");
+ //RNA_def_property_flag(prop, PROP_HIDDEN);
+ }
}
static void TRANSFORM_OT_translate(struct wmOperatorType *ot)