Blender V5.0
ED_select_utils.hh File Reference
#include <string>
#include "BLI_compiler_attrs.h"

Go to the source code of this file.

Classes

struct  SelectPick_Params

Macros

#define SEL_OP_USE_OUTSIDE(sel_op)
#define SEL_OP_USE_PRE_DESELECT(sel_op)
#define SEL_OP_CAN_DESELECT(sel_op)

Enumerations

enum  { SEL_TOGGLE = 0 , SEL_SELECT = 1 , SEL_DESELECT = 2 , SEL_INVERT = 3 }
enum  WalkSelectDirection { UI_SELECT_WALK_UP , UI_SELECT_WALK_DOWN , UI_SELECT_WALK_LEFT , UI_SELECT_WALK_RIGHT }
enum  eSelectOp : int8_t {
  SEL_OP_ADD = 1 , SEL_OP_SUB , SEL_OP_SET , SEL_OP_AND ,
  SEL_OP_XOR
}
enum  eSimilarCmp { SIM_CMP_EQ = 0 , SIM_CMP_GT , SIM_CMP_LT }

Functions

int ED_select_op_action (eSelectOp sel_op, bool is_select, bool is_inside)
int ED_select_op_action_deselected (eSelectOp sel_op, bool is_select, bool is_inside)
bool ED_select_similar_compare_float (float delta, float thresh, eSimilarCmp compare)
bool ED_select_similar_compare_float_tree (const KDTree_1d *tree, float length, float thresh, eSimilarCmp compare)
eSelectOp ED_select_op_modal (eSelectOp sel_op, bool is_first)
eSelectOp ED_select_op_from_operator (PointerRNA *ptr) ATTR_WARN_UNUSED_RESULT
SelectPick_Params ED_select_pick_params_from_operator (PointerRNA *ptr) ATTR_NONNULL(1)
std::string ED_select_pick_get_name (wmOperatorType *ot, PointerRNA *ptr)
std::string ED_select_circle_get_name (wmOperatorType *ot, PointerRNA *ptr)

Macro Definition Documentation

◆ SEL_OP_CAN_DESELECT

#define SEL_OP_CAN_DESELECT ( sel_op)
Value:
(!ELEM(sel_op, SEL_OP_ADD))
#define ELEM(...)
@ SEL_OP_ADD

Definition at line 51 of file ED_select_utils.hh.

Referenced by do_lasso_select_paintvert(), and do_paintvert_box_select().

◆ SEL_OP_USE_OUTSIDE

#define SEL_OP_USE_OUTSIDE ( sel_op)
Value:
(ELEM(sel_op, SEL_OP_AND))
@ SEL_OP_AND

Definition at line 49 of file ED_select_utils.hh.

Referenced by do_object_box_select().

◆ SEL_OP_USE_PRE_DESELECT

#define SEL_OP_USE_PRE_DESELECT ( sel_op)
Value:
(ELEM(sel_op, SEL_OP_SET))
@ SEL_OP_SET

Definition at line 50 of file ED_select_utils.hh.

Referenced by action_circle_select_exec(), actkeys_box_select_exec(), actkeys_lassoselect_exec(), armature_circle_select(), box_select_exec(), box_select_exec(), box_select_exec(), circle_select_exec(), circle_select_exec(), clip_lasso_select_exec(), do_armature_box_select(), do_lasso_select_armature(), do_lasso_select_lattice(), do_lasso_select_mask(), do_lasso_select_mesh(), do_lasso_select_mesh_uv(), do_lasso_select_meta(), blender::ed::space_node::do_lasso_select_node(), do_lasso_select_objects(), do_lasso_select_paintface(), do_lasso_select_paintvert(), do_lattice_box_select(), do_mesh_box_select(), do_meta_box_select(), do_object_box_select(), do_paintface_box_select(), do_paintvert_box_select(), do_pose_tag_select_op_exec(), ed_marker_box_select_exec(), file_box_select_exec(), graph_circle_select_exec(), graphkeys_box_select_exec(), graphkeys_lassoselect_exec(), lattice_circle_select(), mball_circle_select(), mesh_circle_select(), nlaedit_box_select_exec(), blender::ed::space_node::node_box_select_exec(), blender::ed::space_node::node_circleselect_exec(), object_circle_select(), blender::ed::outliner::outliner_box_select_exec(), paint_facesel_circle_select(), paint_vertsel_circle_select(), PE_box_select(), PE_circle_select(), PE_lasso_select(), pose_circle_select(), blender::ed::vse::sequencer_box_select_exec(), blender::ed::vse::sequencer_retiming_box_select_exec(), uv_box_select_exec(), uv_circle_select_exec(), blender::ed::vse::vse_circle_select_exec(), and blender::ed::vse::vse_lasso_select_exec().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SEL_TOGGLE 
SEL_SELECT 
SEL_DESELECT 
SEL_INVERT 

Definition at line 19 of file ED_select_utils.hh.

◆ eSelectOp

enum eSelectOp : int8_t

See WM_operator_properties_select_operation

Enumerator
SEL_OP_ADD 
SEL_OP_SUB 
SEL_OP_SET 
SEL_OP_AND 
SEL_OP_XOR 

Definition at line 34 of file ED_select_utils.hh.

◆ eSimilarCmp

Select Similar.

Enumerator
SIM_CMP_EQ 
SIM_CMP_GT 
SIM_CMP_LT 

Definition at line 43 of file ED_select_utils.hh.

◆ WalkSelectDirection

Enumerator
UI_SELECT_WALK_UP 
UI_SELECT_WALK_DOWN 
UI_SELECT_WALK_LEFT 
UI_SELECT_WALK_RIGHT 

Definition at line 26 of file ED_select_utils.hh.

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 ( float delta,
float thresh,
eSimilarCmp compare )

◆ ED_select_similar_compare_float_tree()