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>2019-03-05 14:26:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-05 14:26:45 +0300
commit8d8d113b7379b96d8cd9440f4e1f87524a418fef (patch)
treeecc4ac8f59c846918fd280db82ee87dc15c92e4d /source/blender/editors/util
parent0ae6747300a74daf14482f9ca89caffa9e503454 (diff)
Tool System: use set/add/subtract for all circle select operators
This applies changes from the 3D view circle select to other operators.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/select_utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/util/select_utils.c b/source/blender/editors/util/select_utils.c
index b0b001ee238..80b103e0c4b 100644
--- a/source/blender/editors/util/select_utils.c
+++ b/source/blender/editors/util/select_utils.c
@@ -69,6 +69,19 @@ int ED_select_op_action_deselected(const eSelectOp sel_op, const bool is_select,
return -1;
}
+/**
+ * Utility to use for selection operations that run multiple times (circle select).
+ */
+eSelectOp ED_select_op_modal(const eSelectOp sel_op, const bool is_first)
+{
+ if (sel_op == SEL_OP_SET) {
+ if (is_first == false) {
+ return SEL_OP_ADD;
+ }
+ }
+ return sel_op;
+}
+
int ED_select_similar_compare_float(const float delta, const float thresh, const int compare)
{
switch (compare) {