Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/ED_select_utils.h
| Show All 19 Lines | |||||
| /** \file ED_select_utils.h | /** \file ED_select_utils.h | ||||
| * \ingroup editors | * \ingroup editors | ||||
| */ | */ | ||||
| #ifndef __ED_SELECT_UTILS_H__ | #ifndef __ED_SELECT_UTILS_H__ | ||||
| #define __ED_SELECT_UTILS_H__ | #define __ED_SELECT_UTILS_H__ | ||||
| struct KDTree; | |||||
| enum { | enum { | ||||
| SEL_TOGGLE = 0, | SEL_TOGGLE = 0, | ||||
| SEL_SELECT = 1, | SEL_SELECT = 1, | ||||
| SEL_DESELECT = 2, | SEL_DESELECT = 2, | ||||
| SEL_INVERT = 3, | SEL_INVERT = 3, | ||||
| }; | }; | ||||
| /** See #WM_operator_properties_select_operation */ | /** See #WM_operator_properties_select_operation */ | ||||
| typedef enum { | typedef enum { | ||||
| SEL_OP_ADD = 1, | SEL_OP_ADD = 1, | ||||
| SEL_OP_SUB, | SEL_OP_SUB, | ||||
| SEL_OP_SET, | SEL_OP_SET, | ||||
| SEL_OP_AND, | SEL_OP_AND, | ||||
| SEL_OP_XOR, | SEL_OP_XOR, | ||||
| } eSelectOp; | } eSelectOp; | ||||
| /* Select Similar */ | |||||
| enum { | |||||
| SIM_CMP_EQ = 0, | |||||
| SIM_CMP_GT, | |||||
| SIM_CMP_LT | |||||
| }; | |||||
| #define SEL_OP_USE_OUTSIDE(sel_op) (ELEM(sel_op, SEL_OP_AND)) | #define SEL_OP_USE_OUTSIDE(sel_op) (ELEM(sel_op, SEL_OP_AND)) | ||||
| #define SEL_OP_USE_PRE_DESELECT(sel_op) (ELEM(sel_op, SEL_OP_SET)) | #define SEL_OP_USE_PRE_DESELECT(sel_op) (ELEM(sel_op, SEL_OP_SET)) | ||||
| #define SEL_OP_CAN_DESELECT(sel_op) (!ELEM(sel_op, SEL_OP_ADD)) | #define SEL_OP_CAN_DESELECT(sel_op) (!ELEM(sel_op, SEL_OP_ADD)) | ||||
| /* Use when we've de-selected all first for 'SEL_OP_SET' */ | /* Use when we've de-selected all first for 'SEL_OP_SET' */ | ||||
| int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool is_inside); | int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool is_inside); | ||||
| int ED_select_op_action_deselected(const eSelectOp sel_op, const bool is_select, const bool is_inside); | int ED_select_op_action_deselected(const eSelectOp sel_op, const bool is_select, const bool is_inside); | ||||
| int ED_select_similar_compare_float(const float delta, const float thresh, const int compare); | |||||
| bool ED_select_similar_compare_float_tree(const struct KDTree *tree, const float length, const float thresh, const int compare); | |||||
| #endif /* __ED_SELECT_UTILS_H__ */ | #endif /* __ED_SELECT_UTILS_H__ */ | ||||