Blender V5.0
ED_select_utils.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <string>
12
13#include "BLI_compiler_attrs.h"
14
15struct KDTree_1d;
16struct PointerRNA;
17struct wmOperatorType;
18
19enum {
24};
25
32
41
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
57int ED_select_op_action(eSelectOp sel_op, bool is_select, bool is_inside);
64int ED_select_op_action_deselected(eSelectOp sel_op, bool is_select, bool is_inside);
65
66bool ED_select_similar_compare_float(float delta, float thresh, eSimilarCmp compare);
67bool ED_select_similar_compare_float_tree(const KDTree_1d *tree,
68 float length,
69 float thresh,
70 eSimilarCmp compare);
71
75eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first);
76
96
101
107
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
eSelectOp
@ SEL_OP_ADD
@ SEL_OP_SUB
@ SEL_OP_SET
@ SEL_OP_AND
@ SEL_OP_XOR
int ED_select_op_action_deselected(eSelectOp sel_op, bool is_select, bool is_inside)
eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first)
@ SEL_SELECT
@ SEL_INVERT
@ SEL_DESELECT
@ SEL_TOGGLE
eSelectOp ED_select_op_from_operator(PointerRNA *ptr) ATTR_WARN_UNUSED_RESULT
int ED_select_op_action(eSelectOp sel_op, bool is_select, bool is_inside)
std::string ED_select_circle_get_name(wmOperatorType *ot, PointerRNA *ptr)
WalkSelectDirection
@ UI_SELECT_WALK_RIGHT
@ UI_SELECT_WALK_UP
@ UI_SELECT_WALK_LEFT
@ UI_SELECT_WALK_DOWN
bool ED_select_similar_compare_float(float delta, float thresh, eSimilarCmp compare)
SelectPick_Params ED_select_pick_params_from_operator(PointerRNA *ptr) ATTR_NONNULL(1)
eSimilarCmp
@ SIM_CMP_LT
@ SIM_CMP_GT
@ SIM_CMP_EQ
bool ED_select_similar_compare_float_tree(const KDTree_1d *tree, float length, float thresh, eSimilarCmp compare)
std::string ED_select_pick_get_name(wmOperatorType *ot, PointerRNA *ptr)
KDTree_3d * tree
static bool is_inside(int x, int y, int cols, int rows)
Definition filesel.cc:764
float length(VecOp< float, D >) RET
PointerRNA * ptr
Definition wm_files.cc:4238
wmOperatorType * ot
Definition wm_files.cc:4237