Blender V5.3
armature_select.cc File Reference
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_listbase.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_rect.hh"
#include "BLI_string_utils.hh"
#include "BKE_action.hh"
#include "BKE_armature.hh"
#include "BKE_context.hh"
#include "BKE_layer.hh"
#include "BKE_object.hh"
#include "BKE_object_types.hh"
#include "BKE_report.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_armature.hh"
#include "ED_object.hh"
#include "ED_outliner.hh"
#include "ED_screen.hh"
#include "ED_select_utils.hh"
#include "ED_view3d.hh"
#include "DEG_depsgraph.hh"
#include "GPU_select.hh"
#include "ANIM_armature.hh"
#include "ANIM_bone_collections.hh"
#include "ANIM_bonecolor.hh"
#include "armature_intern.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define EBONE_PREV_FLAG_GET(ebone)
#define EBONE_PREV_FLAG_SET(ebone, val)
#define CHECK_PARENT(ebone)
#define STRUCT_SIZE_AND_OFFSET(_struct, _member)

Functions

Select Buffer Queries for PoseMode & EditMode
bool blender::ED_armature_selectresult_is_bone (const GPUSelectResult &hit_result)
Base * blender::ED_armature_base_and_ebone_from_select_buffer (const Span< Base * > bases, const uint select_id, EditBone **r_ebone)
Object * blender::ED_armature_object_and_ebone_from_select_buffer (const Span< Object * > objects, const uint select_id, EditBone **r_ebone)
Base * blender::ED_armature_base_and_pchan_from_select_buffer (const Span< Base * > bases, const uint select_id, bPoseChannel **r_pchan)
Base * blender::ED_armature_base_and_bone_from_select_buffer (const Span< Base * > bases, const uint select_id, Bone **r_bone)
Cursor Pick from Select Buffer API
static void * blender::ed_armature_pick_bone_from_selectbuffer_impl (const bool is_editmode, const Span< Base * > bases, const Span< GPUSelectResult > hit_results, bool findunsel, bool do_nearest, Base **r_base)
EditBone * blender::ED_armature_pick_ebone_from_selectbuffer (const Span< Base * > bases, const GPUSelectResult *hit_results, const int hits, bool findunsel, bool do_nearest, Base **r_base)
bPoseChannel * blender::ED_armature_pick_pchan_from_selectbuffer (const Span< Base * > bases, const GPUSelectResult *hit_results, const int hits, bool findunsel, bool do_nearest, Base **r_base)
Bone * blender::ED_armature_pick_bone_from_selectbuffer (const Span< Base * > bases, const GPUSelectResult *hit_results, const int hits, bool findunsel, bool do_nearest, Base **r_base)
Cursor Pick API
static void * blender::ed_armature_pick_bone_impl (const bool is_editmode, bContext *C, const int xy[2], bool findunsel, Base **r_base)
EditBone * blender::ED_armature_pick_ebone (bContext *C, const int xy[2], bool findunsel, Base **r_base)
bPoseChannel * blender::ED_armature_pick_pchan (bContext *C, const int xy[2], bool findunsel, Base **r_base)
Bone * blender::ED_armature_pick_bone (bContext *C, const int xy[2], bool findunsel, Base **r_base)
Select Linked Implementation

Shared logic for select linked all/pick.

Use BONE_DONE flag to select linked.

static bool blender::armature_select_linked_impl (Object *ob, const bool select, const bool all_forks)
Select Linked Operator
static wmOperatorStatus blender::armature_select_linked_exec (bContext *C, wmOperator *op)
Armature EditMode Operators
void blender::ARMATURE_OT_select_linked (wmOperatorType *ot)
void blender::ARMATURE_OT_select_linked_pick (wmOperatorType *ot)
void blender::ARMATURE_OT_select_all (wmOperatorType *ot)
void blender::ARMATURE_OT_select_more (wmOperatorType *ot)
void blender::ARMATURE_OT_select_less (wmOperatorType *ot)
void blender::ARMATURE_OT_select_similar (wmOperatorType *ot)
void blender::ARMATURE_OT_select_hierarchy (wmOperatorType *ot)
void blender::ARMATURE_OT_select_mirror (wmOperatorType *ot)
void blender::ARMATURE_OT_shortest_path_pick (wmOperatorType *ot)
Select Linked (Cursor Pick) Operator
static wmOperatorStatus blender::armature_select_linked_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static bool blender::armature_select_linked_pick_poll (bContext *C)
Select Buffer Queries EditMode
static int blender::selectbuffer_ret_hits_12 (MutableSpan< GPUSelectResult >, const int hits12)
static int blender::selectbuffer_ret_hits_5 (MutableSpan< GPUSelectResult > hit_results, const int hits12, const int hits5)
static EditBone * blender::get_nearest_editbonepoint (ViewContext *vc, bool findunsel, bool use_cycle, Base **r_base, eBone_Flag *r_selmask)
Select Utility Functions
bool blender::ED_armature_edit_deselect_all (Object *obedit)
bool blender::ED_armature_edit_deselect_all_visible (Object *obedit)
bool blender::ED_armature_edit_deselect_all_multi_ex (const Span< Base * > bases)
bool blender::ED_armature_edit_deselect_all_visible_multi_ex (const Span< Base * > bases)
bool blender::ED_armature_edit_deselect_all_visible_multi (bContext *C)
Select Cursor Pick API
bool blender::ED_armature_edit_select_pick_bone (bContext *C, Base *basact, EditBone *ebone, const eBone_Flag selmask, const SelectPick_Params &params)
bool blender::ED_armature_edit_select_pick (bContext *C, const int mval[2], const SelectPick_Params &params)
Select Op From Tagged
static bool blender::armature_edit_select_op_apply (bArmature *arm, EditBone *ebone, const eSelectOp sel_op, int is_ignore_flag, int is_inside_flag)
bool blender::ED_armature_edit_select_op_from_tagged (bArmature *arm, const int sel_op)
(De)Select All Operator
static wmOperatorStatus blender::armature_de_select_all_exec (bContext *C, wmOperator *op)
Select More/Less Implementation
static void blender::armature_select_more (bArmature *arm, EditBone *ebone)
static void blender::armature_select_less (bArmature *, EditBone *ebone)
static void blender::armature_select_more_less (Object *ob, bool more)
Select More Operator
static wmOperatorStatus blender::armature_de_select_more_exec (bContext *C, wmOperator *)
Select Less Operator
static wmOperatorStatus blender::armature_de_select_less_exec (bContext *C, wmOperator *)
Select Hierarchy Operator
static wmOperatorStatus blender::armature_select_hierarchy_exec (bContext *C, wmOperator *op)
Select Mirror Operator
static wmOperatorStatus blender::armature_select_mirror_exec (bContext *C, wmOperator *op)
Select Path Operator
static bool blender::armature_shortest_path_select (bArmature *arm, EditBone *ebone_parent, EditBone *ebone_child, bool use_parent, bool is_test)
static wmOperatorStatus blender::armature_shortest_path_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event)

Select Similar

enum  {
  blender::SIMEDBONE_CHILDREN = 1 , blender::SIMEDBONE_CHILDREN_IMMEDIATE , blender::SIMEDBONE_SIBLINGS , blender::SIMEDBONE_LENGTH ,
  blender::SIMEDBONE_DIRECTION , blender::SIMEDBONE_PREFIX , blender::SIMEDBONE_SUFFIX , blender::SIMEDBONE_COLLECTION ,
  blender::SIMEDBONE_COLOR , blender::SIMEDBONE_SHAPE
}
static const EnumPropertyItem blender::prop_similar_types []
static float blender::bone_length_squared_worldspace_get (Object *ob, EditBone *ebone)
static void blender::select_similar_length (bContext *C, const float thresh)
static void blender::bone_direction_worldspace_get (Object *ob, EditBone *ebone, float *r_dir)
static void blender::select_similar_direction (bContext *C, const float thresh)
static void blender::select_similar_bone_collection (bContext *C)
static void blender::select_similar_bone_color (bContext *C)
static void blender::select_similar_prefix (bContext *C)
static void blender::select_similar_suffix (bContext *C)
static void blender::select_similar_data_pchan (bContext *C, const size_t bytes_size, const int offset)
static void blender::is_ancestor (EditBone *bone, EditBone *ancestor)
static void blender::select_similar_children (bContext *C)
static void blender::select_similar_children_immediate (bContext *C)
static void blender::select_similar_siblings (bContext *C)
static wmOperatorStatus blender::armature_select_similar_exec (bContext *C, wmOperator *op)

Detailed Description

API's and Operators for selecting armature bones in EditMode.

Definition in file armature_select.cc.

Macro Definition Documentation

◆ CHECK_PARENT

#define CHECK_PARENT ( ebone)
Value:
\
(((ebone)->flag & BONE_CONNECTED) && \
((ebone)->parent ? EBONE_SELECTABLE(arm, (ebone)->parent) : false))
#define EBONE_SELECTABLE(arm, ebone)

Referenced by blender::armature_select_linked_impl().

◆ EBONE_PREV_FLAG_GET

#define EBONE_PREV_FLAG_GET ( ebone)
Value:
((void)0, (ebone)->temp.i)

Definition at line 54 of file armature_select.cc.

Referenced by blender::armature_select_less(), blender::armature_select_mirror_exec(), and blender::armature_select_more().

◆ EBONE_PREV_FLAG_SET

#define EBONE_PREV_FLAG_SET ( ebone,
val )
Value:
((ebone)->temp.i = val)

Definition at line 55 of file armature_select.cc.

Referenced by blender::armature_select_mirror_exec(), and blender::armature_select_more_less().

◆ STRUCT_SIZE_AND_OFFSET

#define STRUCT_SIZE_AND_OFFSET ( _struct,
_member )
Value:
sizeof(_struct::_member), offsetof(_struct, _member)
#define offsetof(t, d)

Referenced by blender::armature_select_similar_exec().