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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-05-16 22:33:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-16 22:33:07 +0400
commitb9fa4f7df9ce2559664f9b9a0b6034d0b36661d1 (patch)
tree233fb98c1409e8f7ed7240b6a78fe62edc3d0896 /source/blender/editors/mesh/editmesh_loopcut.c
parentf334df56242c3b2a5ad1808c4dec745c7c35a315 (diff)
workaround for loopselect-slide (with multicut enabled) changing from vertex-select to edge-select.
this is needed to slide, but wasn't so nice for users, now restore the original mode.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loopcut.c')
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index bfd94a2ecf4..a126546c81c 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -445,6 +445,21 @@ static int loopcut_init(bContext *C, wmOperator *op, const wmEvent *event)
loopcut_update_edge(lcd, e, 0);
}
+#ifdef USE_LOOPSLIDE_HACK
+ /* for use in macro so we can restore, HACK */
+ {
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *settings = scene->toolsettings;
+ int mesh_select_mode[3] = {
+ (settings->selectmode & SCE_SELECT_VERTEX) != 0,
+ (settings->selectmode & SCE_SELECT_EDGE) != 0,
+ (settings->selectmode & SCE_SELECT_FACE) != 0,
+ };
+
+ RNA_boolean_set_array(op->ptr, "mesh_select_mode_init", mesh_select_mode);
+ }
+#endif
+
if (is_interactive) {
ScrArea *sa = CTX_wm_area(C);
ED_area_headerprint(sa, IFACE_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "
@@ -660,4 +675,9 @@ void MESH_OT_loopcut(wmOperatorType *ot)
prop = RNA_def_int(ot->srna, "edge_index", -1, -1, INT_MAX, "Number of Cuts", "", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_HIDDEN);
+
+#ifdef USE_LOOPSLIDE_HACK
+ prop = RNA_def_boolean_array(ot->srna, "mesh_select_mode_init", 3, NULL, "", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+#endif
}