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>2018-08-14 03:28:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-14 18:48:55 +0300
commite88e80a6a0c8976ac2d245c274ca5a0388736743 (patch)
tree870bc13538dfb5b55d4063cdab0aa611573dde60 /source/blender/windowmanager/intern/wm_operator_props.c
parentd92d310b158d4b946aa8b811248b25e7a39f7a1a (diff)
3D View boarder/lasso select tool options
Add tool options to control how select operates (add/sub/set/and/xor). Note: edit mode armature select still needs to support all options, this is complicated by how it handles partial end-point selection.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operator_props.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operator_props.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index d4fb7279abc..ceb0fb75f78 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -39,6 +39,8 @@
#include "RNA_define.h"
#include "RNA_enum_types.h"
+#include "ED_select_utils.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -250,6 +252,20 @@ void WM_operator_properties_gesture_border(wmOperatorType *ot)
WM_operator_properties_gesture_border_ex(ot, false, false);
}
+void WM_operator_properties_select_operation(wmOperatorType *ot)
+{
+ static const EnumPropertyItem select_mode_items[] = {
+ {SEL_OP_ADD, "ADD", 0, "Add", ""},
+ {SEL_OP_SUB, "SUB", 0, "Subtract", ""},
+ {SEL_OP_SET, "SET", 0, "Set", ""},
+ {SEL_OP_AND, "AND", 0, "And", ""},
+ {SEL_OP_XOR, "XOR", 0, "Xor", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+ PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_ADD, "Mode", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+}
+
void WM_operator_properties_gesture_border_zoom(wmOperatorType *ot)
{
WM_operator_properties_border(ot);