Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/ED_select_utils.h
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | enum { | ||||
| SIM_CMP_GT, | SIM_CMP_GT, | ||||
| SIM_CMP_LT, | 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'. | |||||
| * 1: select, 0: deselect, -1: pass. | |||||
| */ | |||||
| 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); | ||||
| /** | |||||
| * Use when we've de-selected all items first (for modes that need it). | |||||
| * | |||||
| * \note In some cases changing selection needs to perform other checks, | |||||
| * so it's more straightforward to deselect all, then select. | |||||
| */ | |||||
| int ED_select_op_action_deselected(const eSelectOp sel_op, | int ED_select_op_action_deselected(const eSelectOp sel_op, | ||||
| const bool is_select, | const bool is_select, | ||||
| const bool is_inside); | const bool is_inside); | ||||
| int ED_select_similar_compare_float(const float delta, const float thresh, const int compare); | 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_1d *tree, | bool ED_select_similar_compare_float_tree(const struct KDTree_1d *tree, | ||||
| const float length, | const float length, | ||||
| const float thresh, | const float thresh, | ||||
| const int compare); | const int compare); | ||||
| /** | |||||
| * 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); | eSelectOp ED_select_op_modal(const eSelectOp sel_op, const bool is_first); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||