Blender V5.0
select_utils.cc File Reference
#include <cfloat>
#include <cmath>
#include <cstring>
#include "BLI_kdtree.h"
#include "BLT_translation.hh"
#include "DNA_windowmanager_types.h"
#include "RNA_access.hh"
#include "WM_types.hh"
#include "ED_select_utils.hh"

Go to the source code of this file.

Functions

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)
eSelectOp ED_select_op_modal (const eSelectOp sel_op, const bool is_first)
bool ED_select_similar_compare_float (const float delta, const float thresh, const eSimilarCmp compare)
bool ED_select_similar_compare_float_tree (const KDTree_1d *tree, const float length, const float thresh, const eSimilarCmp compare)
eSelectOp ED_select_op_from_operator (PointerRNA *ptr)
SelectPick_Params ED_select_pick_params_from_operator (PointerRNA *ptr)
Operator Naming Callbacks
std::string ED_select_pick_get_name (wmOperatorType *, PointerRNA *ptr)
std::string ED_select_circle_get_name (wmOperatorType *, PointerRNA *ptr)

Function Documentation

◆ ED_select_circle_get_name()

◆ ED_select_op_action()

int ED_select_op_action ( eSelectOp sel_op,
bool is_select,
bool is_inside )

Use when we've de-selected all first for 'SEL_OP_SET'. 1: select, 0: deselect, -1: pass.

Definition at line 25 of file select_utils.cc.

References BLI_assert_msg, is_inside(), SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, and SEL_OP_XOR.

◆ ED_select_op_action_deselected()

◆ ED_select_op_from_operator()

eSelectOp ED_select_op_from_operator ( PointerRNA * ptr)

Utility to get #eSelectPickMode from booleans for convenience.

Definition at line 132 of file select_utils.cc.

References ptr, RNA_boolean_get(), SEL_OP_ADD, SEL_OP_SET, SEL_OP_SUB, and SEL_OP_XOR.

Referenced by bone_select_menu_exec(), and ED_select_pick_params_from_operator().

◆ ED_select_op_modal()

eSelectOp ED_select_op_modal ( eSelectOp sel_op,
bool is_first )

Utility to use for selection operations that run multiple times (circle select).

Definition at line 63 of file select_utils.cc.

References SEL_OP_ADD, and SEL_OP_SET.

Referenced by action_circle_select_exec(), circle_select_exec(), circle_select_exec(), graph_circle_select_exec(), blender::ed::space_node::node_circleselect_exec(), uv_circle_select_exec(), and view3d_circle_select_exec().

◆ ED_select_pick_get_name()

◆ ED_select_pick_params_from_operator()

SelectPick_Params ED_select_pick_params_from_operator ( PointerRNA * ptr)

◆ ED_select_similar_compare_float()

bool ED_select_similar_compare_float ( const float delta,
const float thresh,
const eSimilarCmp compare )

◆ ED_select_similar_compare_float_tree()