Blender  V3.3
ED_select_utils.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #include "BLI_compiler_attrs.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 struct KDTree_1d;
16 struct wmOperator;
17 struct wmOperatorType;
18 
19 enum {
24 };
25 
26 typedef enum WalkSelectDirection {
32 
34 typedef enum {
40 } eSelectOp;
41 
42 /* Select Similar */
43 typedef enum {
47 } eSimilarCmp;
48 
49 #define SEL_OP_USE_OUTSIDE(sel_op) (ELEM(sel_op, SEL_OP_AND))
50 #define SEL_OP_USE_PRE_DESELECT(sel_op) (ELEM(sel_op, SEL_OP_SET))
51 #define SEL_OP_CAN_DESELECT(sel_op) (!ELEM(sel_op, SEL_OP_ADD))
52 
57 int ED_select_op_action(eSelectOp sel_op, bool is_select, bool is_inside);
64 int ED_select_op_action_deselected(eSelectOp sel_op, bool is_select, bool is_inside);
65 
66 bool ED_select_similar_compare_float(float delta, float thresh, eSimilarCmp compare);
67 bool ED_select_similar_compare_float_tree(const struct KDTree_1d *tree,
68  float length,
69  float thresh,
70  eSimilarCmp compare);
71 
75 eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first);
76 
95 };
96 
102 
108  ATTR_NONNULL(1, 2);
109 
116 
117 #ifdef __cplusplus
118 }
119 #endif
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
enum WalkSelectDirection WalkSelectDirections
int ED_select_op_action_deselected(eSelectOp sel_op, bool is_select, bool is_inside)
Definition: select_utils.c:38
eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first)
Definition: select_utils.c:59
void ED_select_pick_params_from_operator(struct PointerRNA *ptr, struct SelectPick_Params *params) ATTR_NONNULL(1
int ED_select_op_action(eSelectOp sel_op, bool is_select, bool is_inside)
Definition: select_utils.c:21
const char * ED_select_circle_get_name(struct wmOperatorType *ot, PointerRNA *ptr)
WalkSelectDirection
@ UI_SELECT_WALK_RIGHT
@ UI_SELECT_WALK_UP
@ UI_SELECT_WALK_LEFT
@ UI_SELECT_WALK_DOWN
@ SEL_SELECT
@ SEL_INVERT
@ SEL_DESELECT
@ SEL_TOGGLE
bool ED_select_similar_compare_float(float delta, float thresh, eSimilarCmp compare)
Definition: select_utils.c:69
eSelectOp ED_select_op_from_operator(struct PointerRNA *ptr) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
Definition: select_utils.c:128
eSimilarCmp
@ SIM_CMP_LT
@ SIM_CMP_GT
@ SIM_CMP_EQ
void const char * ED_select_pick_get_name(struct wmOperatorType *ot, PointerRNA *ptr)
bool ED_select_similar_compare_float_tree(const struct KDTree_1d *tree, float length, float thresh, eSimilarCmp compare)
eSelectOp
@ SEL_OP_ADD
@ SEL_OP_SUB
@ SEL_OP_SET
@ SEL_OP_AND
@ SEL_OP_XOR
void * tree
static bool is_inside(int x, int y, int cols, int rows)
Definition: filesel.c:706
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
T length(const vec_base< T, Size > &a)
PointerRNA * ptr
Definition: wm_files.c:3480
wmOperatorType * ot
Definition: wm_files.c:3479