|
Blender
V2.93
|
#include "MEM_guardedalloc.h"#include "DNA_armature_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_blenlib.h"#include "BLI_math.h"#include "BLI_rect.h"#include "BLI_string_utils.h"#include "BKE_action.h"#include "BKE_armature.h"#include "BKE_context.h"#include "BKE_layer.h"#include "BKE_object.h"#include "BKE_report.h"#include "RNA_access.h"#include "RNA_define.h"#include "WM_api.h"#include "WM_types.h"#include "ED_armature.h"#include "ED_object.h"#include "ED_outliner.h"#include "ED_screen.h"#include "ED_select_utils.h"#include "ED_view3d.h"#include "DEG_depsgraph.h"#include "armature_intern.h"Go to the source code of this file.
Macros | |
| #define | EBONE_PREV_FLAG_GET(ebone) ((void)0, (ebone)->temp.i) |
| #define | EBONE_PREV_FLAG_SET(ebone, val) ((ebone)->temp.i = val) |
| #define | CHECK_PARENT(ebone) |
| #define | STRUCT_SIZE_AND_OFFSET(_struct, _member) sizeof(((_struct *)NULL)->_member), offsetof(_struct, _member) |
Functions | |
Select Buffer Queries for PoseMode & EditMode | |
| Base * | ED_armature_base_and_ebone_from_select_buffer (Base **bases, uint bases_len, int hit, EditBone **r_ebone) |
| Object * | ED_armature_object_and_ebone_from_select_buffer (Object **objects, uint objects_len, int hit, EditBone **r_ebone) |
| Base * | ED_armature_base_and_pchan_from_select_buffer (Base **bases, uint bases_len, int hit, bPoseChannel **r_pchan) |
| Base * | ED_armature_base_and_bone_from_select_buffer (Base **bases, uint bases_len, int hit, Bone **r_bone) |
Cursor Pick from Select Buffer API | |
| static void * | ed_armature_pick_bone_from_selectbuffer_impl (const bool is_editmode, Base **bases, uint bases_len, const uint *buffer, short hits, bool findunsel, bool do_nearest, Base **r_base) |
| EditBone * | ED_armature_pick_ebone_from_selectbuffer (Base **bases, uint bases_len, const uint *buffer, short hits, bool findunsel, bool do_nearest, Base **r_base) |
| bPoseChannel * | ED_armature_pick_pchan_from_selectbuffer (Base **bases, uint bases_len, const uint *buffer, short hits, bool findunsel, bool do_nearest, Base **r_base) |
| Bone * | ED_armature_pick_bone_from_selectbuffer (Base **bases, uint bases_len, const uint *buffer, short hits, bool findunsel, bool do_nearest, Base **r_base) |
Cursor Pick API | |
Internal ed_armature_pick_bone_impl is exposed as: | |
| static void * | ed_armature_pick_bone_impl (const bool is_editmode, bContext *C, const int xy[2], bool findunsel, Base **r_base) |
| EditBone * | ED_armature_pick_ebone (bContext *C, const int xy[2], bool findunsel, Base **r_base) |
| bPoseChannel * | ED_armature_pick_pchan (bContext *C, const int xy[2], bool findunsel, Base **r_base) |
| Bone * | 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 | armature_select_linked_impl (Object *ob, const bool select, const bool all_forks) |
Select Linked Operator | |
| static int | armature_select_linked_exec (bContext *C, wmOperator *op) |
| void | ARMATURE_OT_select_linked (wmOperatorType *ot) |
Select Linked (Cursor Pick) Operator | |
| static int | armature_select_linked_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static bool | armature_select_linked_pick_poll (bContext *C) |
| void | ARMATURE_OT_select_linked_pick (wmOperatorType *ot) |
Select Buffer Queries EditMode | |
| static int | selectbuffer_ret_hits_12 (uint *UNUSED(buffer), const int hits12) |
| static int | selectbuffer_ret_hits_5 (uint *buffer, const int hits12, const int hits5) |
| static EditBone * | get_nearest_editbonepoint (ViewContext *vc, bool findunsel, bool use_cycle, Base **r_base, int *r_selmask) |
Select Utility Functions | |
| bool | ED_armature_edit_deselect_all (Object *obedit) |
| bool | ED_armature_edit_deselect_all_visible (Object *obedit) |
| bool | ED_armature_edit_deselect_all_multi_ex (struct Base **bases, uint bases_len) |
| bool | ED_armature_edit_deselect_all_visible_multi_ex (struct Base **bases, uint bases_len) |
| bool | ED_armature_edit_deselect_all_visible_multi (bContext *C) |
Select Cursor Pick API | |
| bool | ED_armature_edit_select_pick_bone (bContext *C, Base *basact, EditBone *ebone, const int selmask, const bool extend, const bool deselect, const bool toggle) |
| bool | ED_armature_edit_select_pick (bContext *C, const int mval[2], bool extend, bool deselect, bool toggle) |
Select Op From Tagged | |
Implements ED_armature_edit_select_op_from_tagged | |
| static bool | armature_edit_select_op_apply (bArmature *arm, EditBone *ebone, const eSelectOp sel_op, int is_ignore_flag, int is_inside_flag) |
| bool | ED_armature_edit_select_op_from_tagged (bArmature *arm, const int sel_op) |
(De)Select All Operator | |
| static int | armature_de_select_all_exec (bContext *C, wmOperator *op) |
| void | ARMATURE_OT_select_all (wmOperatorType *ot) |
Select More/Less Implementation | |
| static void | armature_select_more (bArmature *arm, EditBone *ebone) |
| static void | armature_select_less (bArmature *UNUSED(arm), EditBone *ebone) |
| static void | armature_select_more_less (Object *ob, bool more) |
Select More Operator | |
| static int | armature_de_select_more_exec (bContext *C, wmOperator *UNUSED(op)) |
| void | ARMATURE_OT_select_more (wmOperatorType *ot) |
Select Less Operator | |
| static int | armature_de_select_less_exec (bContext *C, wmOperator *UNUSED(op)) |
| void | ARMATURE_OT_select_less (wmOperatorType *ot) |
Select Hierarchy Operator | |
| static int | armature_select_hierarchy_exec (bContext *C, wmOperator *op) |
| void | ARMATURE_OT_select_hierarchy (wmOperatorType *ot) |
Select Mirror Operator | |
| static int | armature_select_mirror_exec (bContext *C, wmOperator *op) |
| void | ARMATURE_OT_select_mirror (wmOperatorType *ot) |
Select Path Operator | |
| static bool | armature_shortest_path_select (bArmature *arm, EditBone *ebone_parent, EditBone *ebone_child, bool use_parent, bool is_test) |
| static int | armature_shortest_path_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | ARMATURE_OT_shortest_path_pick (wmOperatorType *ot) |
| #define CHECK_PARENT | ( | ebone | ) |
| #define EBONE_PREV_FLAG_GET | ( | ebone | ) | ((void)0, (ebone)->temp.i) |
Definition at line 61 of file armature_select.c.
| #define EBONE_PREV_FLAG_SET | ( | ebone, | |
| val | |||
| ) | ((ebone)->temp.i = val) |
Definition at line 62 of file armature_select.c.
| #define STRUCT_SIZE_AND_OFFSET | ( | _struct, | |
| _member | |||
| ) | sizeof(((_struct *)NULL)->_member), offsetof(_struct, _member) |
| anonymous enum |
| Enumerator | |
|---|---|
| SIMEDBONE_CHILDREN | |
| SIMEDBONE_CHILDREN_IMMEDIATE | |
| SIMEDBONE_SIBLINGS | |
| SIMEDBONE_LENGTH | |
| SIMEDBONE_DIRECTION | |
| SIMEDBONE_PREFIX | |
| SIMEDBONE_SUFFIX | |
| SIMEDBONE_LAYER | |
| SIMEDBONE_GROUP | |
| SIMEDBONE_SHAPE | |
Definition at line 1547 of file armature_select.c.
|
static |
Definition at line 1295 of file armature_select.c.
References BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_UNSELECTABLE, C, CTX_DATA_BEGIN, CTX_data_edit_object(), CTX_DATA_END, DEG_id_tag_update(), ED_outliner_select_sync_from_edit_bone_tag(), Object::id, ID_RECALC_SELECT, NC_OBJECT, ND_BONE_SELECT, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, and WM_event_add_notifier().
Referenced by ARMATURE_OT_select_all().
|
static |
Definition at line 1508 of file armature_select.c.
References armature_select_more_less(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), ED_outliner_select_sync_from_edit_bone_tag(), Object::id, ID_RECALC_COPY_ON_WRITE, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by ARMATURE_OT_select_less().
|
static |
Definition at line 1469 of file armature_select.c.
References armature_select_more_less(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), ED_outliner_select_sync_from_edit_bone_tag(), Object::id, ID_RECALC_COPY_ON_WRITE, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by ARMATURE_OT_select_more().
|
static |
Definition at line 1113 of file armature_select.c.
References BLI_assert, BONE_DONE, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONESEL_BONE, BONESEL_ROOT, BONESEL_TIP, EBONE_SELECTABLE, EBONE_VISIBLE, ED_select_op_action_deselected(), EditBone::flag, EditBone::i, is_inside(), SET_FLAG_FROM_TEST, and EditBone::temp.
Referenced by ED_armature_edit_select_op_from_tagged().
| void ARMATURE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 1355 of file armature_select.c.
References armature_de_select_all_exec(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_select_hierarchy | ( | wmOperatorType * | ot | ) |
Definition at line 2047 of file armature_select.c.
References armature_select_hierarchy_exec(), BONE_SELECT_CHILD, BONE_SELECT_PARENT, wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 1526 of file armature_select.c.
References armature_de_select_less_exec(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 551 of file armature_select.c.
References armature_select_linked_exec(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_select_linked_pick | ( | wmOperatorType * | ot | ) |
Definition at line 613 of file armature_select.c.
References armature_select_linked_pick_invoke(), armature_select_linked_pick_poll(), wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_select_mirror | ( | wmOperatorType * | ot | ) |
Definition at line 2141 of file armature_select.c.
References armature_select_mirror_exec(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 1487 of file armature_select.c.
References armature_de_select_more_exec(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_select_similar | ( | wmOperatorType * | ot | ) |
Definition at line 1942 of file armature_select.c.
References armature_select_similar_exec(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_similar_types, RNA_def_enum(), RNA_def_float(), SIMEDBONE_LENGTH, wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_shortest_path_pick | ( | wmOperatorType * | ot | ) |
Definition at line 2276 of file armature_select.c.
References armature_shortest_path_pick_invoke(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 1970 of file armature_select.c.
References bArmature::act_edbone, BONE_CONNECTED, BONE_SELECT_PARENT, C, CTX_data_edit_object(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), ED_armature_edit_sync_selection(), ED_outliner_select_sync_from_edit_bone_tag(), bArmature::edbo, ListBase::first, EditBone::flag, Object::id, ID_RECALC_COPY_ON_WRITE, if(), NC_OBJECT, ND_BONE_SELECT, EditBone::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, EditBone::parent, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), and WM_event_add_notifier().
Referenced by ARMATURE_OT_select_hierarchy().
Definition at line 1404 of file armature_select.c.
References BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, EBONE_PREV_FLAG_GET, ED_armature_ebone_select_set(), ED_armature_ebone_selectflag_disable(), EditBone::flag, and EditBone::parent.
Referenced by armature_select_more_less().
|
static |
Definition at line 512 of file armature_select.c.
References armature_select_linked_impl(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BONE_DONE, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, EBONE_VISIBLE, ED_outliner_select_sync_from_edit_bone_tag(), bArmature::edbo, LISTBASE_FOREACH, MEM_freeN, OPERATOR_FINISHED, wmOperator::ptr, and RNA_boolean_get().
Referenced by ARMATURE_OT_select_linked().
|
static |
| all_forks | Control how chains are stepped over. true: select all connected bones traveling up & down forks. false: select all parents and all children, but not the children of the root bone. |
Definition at line 411 of file armature_select.c.
References BONE_DONE, CHECK_PARENT, Object::data, DEG_id_tag_update(), ED_armature_ebone_select_set(), ED_armature_edit_sync_selection(), bArmature::edbo, EditBone::i, bArmature::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, NA_EDITED, NC_GPENCIL, ND_DATA, NULL, EditBone::parent, select(), EditBone::temp, and WM_main_add_notifier().
Referenced by armature_select_linked_exec(), and armature_select_linked_pick_invoke().
|
static |
Definition at line 575 of file armature_select.c.
References armature_select_linked_impl(), BKE_object_update_select_id(), BONE_DONE, C, CTX_data_main(), Object::data, EBONE_SELECTABLE, ED_armature_pick_ebone(), ED_outliner_select_sync_from_edit_bone_tag(), bArmature::edbo, EditBone::flag, LISTBASE_FOREACH, wmEvent::mval, NULL, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), select(), and view3d_operator_needs_opengl().
Referenced by ARMATURE_OT_select_linked_pick().
|
static |
Definition at line 608 of file armature_select.c.
References C, ED_operator_editarmature(), and ED_operator_view3d_active().
Referenced by ARMATURE_OT_select_linked_pick().
|
static |
Definition at line 2081 of file armature_select.c.
References bArmature::act_edbone, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_PREV_FLAG_GET, EBONE_PREV_FLAG_SET, EBONE_SELECTABLE, EBONE_VISIBLE, ED_armature_ebone_get_mirrored(), ED_armature_ebone_selectflag_get(), ED_armature_ebone_selectflag_set(), ED_armature_edit_sync_selection(), ED_outliner_select_sync_from_edit_bone_tag(), bArmature::edbo, ELEM, ListBase::first, Object::id, ID_RECALC_COPY_ON_WRITE, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, EditBone::next, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), and WM_event_add_notifier().
Referenced by ARMATURE_OT_select_mirror().
Definition at line 1378 of file armature_select.c.
References BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, EBONE_PREV_FLAG_GET, EBONE_SELECTABLE, ED_armature_ebone_select_set(), ED_armature_ebone_selectflag_enable(), EditBone::flag, and EditBone::parent.
Referenced by armature_select_more_less().
|
static |
Definition at line 1424 of file armature_select.c.
References armature_select_less(), armature_select_more(), BONE_SELECTED, Object::data, EBONE_PREV_FLAG_SET, EBONE_VISIBLE, ED_armature_ebone_select_set(), ED_armature_ebone_selectflag_get(), ED_armature_edit_sync_selection(), bArmature::edbo, ListBase::first, and NULL.
Referenced by armature_de_select_less_exec(), and armature_de_select_more_exec().
|
static |
Definition at line 1887 of file armature_select.c.
References BKE_report(), C, CTX_data_active_bone(), ED_outliner_select_sync_from_edit_bone_tag(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_float_get(), RPT_ERROR, select_similar_children(), select_similar_children_immediate(), select_similar_data_pchan(), select_similar_direction(), select_similar_layer(), select_similar_length(), select_similar_prefix(), select_similar_siblings(), select_similar_suffix(), SIMEDBONE_CHILDREN, SIMEDBONE_CHILDREN_IMMEDIATE, SIMEDBONE_DIRECTION, SIMEDBONE_GROUP, SIMEDBONE_LAYER, SIMEDBONE_LENGTH, SIMEDBONE_PREFIX, SIMEDBONE_SHAPE, SIMEDBONE_SIBLINGS, SIMEDBONE_SUFFIX, STRUCT_SIZE_AND_OFFSET, and type.
Referenced by ARMATURE_OT_select_similar().
|
static |
Definition at line 2195 of file armature_select.c.
References bArmature::act_edbone, armature_shortest_path_select(), BKE_object_update_select_id(), BKE_report(), C, CTX_data_edit_object(), CTX_data_main(), Object::data, DEG_id_tag_update(), ED_armature_ebone_find_shared_parent(), ED_armature_ebone_is_child_recursive(), ED_armature_edit_sync_selection(), ED_armature_pick_ebone(), ED_outliner_select_sync_from_edit_bone_tag(), bArmature::edbo, ELEM, Object::id, ID_RECALC_COPY_ON_WRITE, wmEvent::mval, NC_OBJECT, ND_BONE_SELECT, NULL, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::reports, RPT_WARNING, SWAP, view3d_operator_needs_opengl(), and WM_event_add_notifier().
Referenced by ARMATURE_OT_shortest_path_pick().
|
static |
Definition at line 2167 of file armature_select.c.
References BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, EBONE_SELECTABLE, ED_armature_ebone_selectflag_set(), and EditBone::parent.
Referenced by armature_shortest_path_pick_invoke().
Definition at line 1619 of file armature_select.c.
References copy_v3_v3(), EditBone::head, mul_m4_v3(), normalize_v3(), Object::obmat, sub_v3_v3v3(), EditBone::tail, v1, and v2.
Referenced by select_similar_direction().
Definition at line 1574 of file armature_select.c.
References EditBone::head, len_squared_v3v3(), mul_v3_mat3_m4v3(), Object::obmat, EditBone::tail, v1, and v2.
Referenced by select_similar_length().
| Base* ED_armature_base_and_bone_from_select_buffer | ( | Base ** | bases, |
| uint | bases_len, | ||
| int | hit, | ||
| Bone ** | r_bone | ||
| ) |
Definition at line 143 of file armature_select.c.
References bPoseChannel::bone, ED_armature_base_and_pchan_from_select_buffer(), and NULL.
Referenced by do_pose_box_select().
| Base* ED_armature_base_and_ebone_from_select_buffer | ( | Base ** | bases, |
| uint | bases_len, | ||
| int | hit, | ||
| EditBone ** | r_ebone | ||
| ) |
Definition at line 68 of file armature_select.c.
References BLI_findlink(), BONESEL_ANY, Object::data, bArmature::edbo, NULL, and Base::object.
Referenced by do_armature_box_select(), ed_armature_pick_bone_from_selectbuffer_impl(), and get_nearest_editbonepoint().
| Base* ED_armature_base_and_pchan_from_select_buffer | ( | Base ** | bases, |
| uint | bases_len, | ||
| int | hit, | ||
| bPoseChannel ** | r_pchan | ||
| ) |
Definition at line 116 of file armature_select.c.
References BLI_findlink(), BONESEL_ANY, bPose::chanbase, NULL, Base::object, and Object::pose.
Referenced by do_object_box_select(), ED_armature_base_and_bone_from_select_buffer(), and ed_armature_pick_bone_from_selectbuffer_impl().
| bool ED_armature_edit_deselect_all | ( | Object * | obedit | ) |
Definition at line 892 of file armature_select.c.
References BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, Object::data, bArmature::edbo, and LISTBASE_FOREACH.
Referenced by armature_bone_primitive_add_exec(), armature_click_extrude_exec(), armature_fill_bones_exec(), ED_armature_ebone_add_primitive(), ED_armature_edit_deselect_all_multi_ex(), ED_object_jump_to_bone(), separate_armature_bones(), and separate_armature_exec().
Definition at line 925 of file armature_select.c.
References ED_armature_edit_deselect_all(), and Base::object.
Referenced by ED_armature_edit_deselect_all_visible_multi(), ED_armature_edit_select_pick_bone(), and tree_element_ebone_activate().
| bool ED_armature_edit_deselect_all_visible | ( | Object * | obedit | ) |
Definition at line 905 of file armature_select.c.
References BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, Object::data, EBONE_VISIBLE, ED_armature_edit_sync_selection(), bArmature::edbo, and LISTBASE_FOREACH.
Referenced by armature_circle_select(), do_lasso_select_armature(), and ED_armature_edit_deselect_all_visible_multi_ex().
| bool ED_armature_edit_deselect_all_visible_multi | ( | bContext * | C | ) |
Definition at line 945 of file armature_select.c.
References BKE_view_layer_array_from_bases_in_edit_mode_unique_data, C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_armature_edit_deselect_all_multi_ex(), ED_view3d_viewcontext_init(), MEM_freeN, ViewContext::v3d, and ViewContext::view_layer.
Referenced by view3d_select_exec().
Definition at line 935 of file armature_select.c.
References ED_armature_edit_deselect_all_visible(), and Base::object.
Referenced by do_armature_box_select().
| bool ED_armature_edit_select_op_from_tagged | ( | bArmature * | arm, |
| const int | sel_op | ||
| ) |
Perform a selection operation on elements which have been 'touched', use for lasso & border select but can be used elsewhere too.
Tagging is done via #EditBone.temp.i using: BONESEL_ROOT, BONESEL_TIP, BONESEL_BONE And optionally ignoring end-points using the BONESEL_ROOT, BONESEL_TIP right shifted 16 bits. (used when the values are clipped outside the view).
| sel_op | eSelectOp type. |
Definition at line 1194 of file armature_select.c.
References armature_edit_select_op_apply(), BONE_CONNECTED, BONE_DONE, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONESEL_BONE, BONESEL_ROOT, BONESEL_TIP, ED_armature_edit_sync_selection(), ED_armature_edit_validate_active(), bArmature::edbo, ELEM, LISTBASE_FOREACH, and SWAP.
Referenced by do_armature_box_select(), and do_lasso_select_armature().
| bool ED_armature_edit_select_pick | ( | bContext * | C, |
| const int | mval[2], | ||
| bool | extend, | ||
| bool | deselect, | ||
| bool | toggle | ||
| ) |
Definition at line 1088 of file armature_select.c.
References C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_armature_edit_select_pick_bone(), ED_view3d_viewcontext_init(), get_nearest_editbonepoint(), ViewContext::mval, and NULL.
Referenced by view3d_select_exec().
| bool ED_armature_edit_select_pick_bone | ( | bContext * | C, |
| Base * | basact, | ||
| EditBone * | ebone, | ||
| const int | selmask, | ||
| const bool | extend, | ||
| const bool | deselect, | ||
| const bool | toggle | ||
| ) |
Definition at line 964 of file armature_select.c.
References bArmature::act_edbone, ViewLayer::basact, BKE_object_is_in_editmode(), BKE_view_layer_array_from_bases_in_edit_mode_unique_data, BLI_assert, BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_selectflag_get(), ED_armature_edit_deselect_all_multi_ex(), ED_armature_edit_sync_selection(), ED_object_base_activate(), bArmature::edbo, EditBone::flag, bArmature::id, ID_RECALC_COPY_ON_WRITE, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, Base::object, EditBone::parent, and WM_event_add_notifier().
Referenced by bone_select_menu_exec(), and ED_armature_edit_select_pick().
| Object* ED_armature_object_and_ebone_from_select_buffer | ( | Object ** | objects, |
| uint | objects_len, | ||
| int | hit, | ||
| EditBone ** | r_ebone | ||
| ) |
Definition at line 92 of file armature_select.c.
References BLI_findlink(), BONESEL_ANY, Object::data, bArmature::edbo, and NULL.
Definition at line 390 of file armature_select.c.
References bPoseChannel::bone, C, ED_armature_pick_pchan(), and NULL.
Referenced by pose_select_connected_invoke().
| Bone* ED_armature_pick_bone_from_selectbuffer | ( | Base ** | bases, |
| uint | bases_len, | ||
| const uint * | buffer, | ||
| short | hits, | ||
| bool | findunsel, | ||
| bool | do_nearest, | ||
| Base ** | r_base | ||
| ) |
Definition at line 296 of file armature_select.c.
References bPoseChannel::bone, buffer, ED_armature_pick_pchan_from_selectbuffer(), and NULL.
Referenced by ED_armature_pose_select_pick_with_buffer().
|
static |
Definition at line 167 of file armature_select.c.
References bPoseChannel::bone, BONE_SELECTED, BONESEL_ANY, buffer, data, ED_armature_base_and_ebone_from_select_buffer(), ED_armature_base_and_pchan_from_select_buffer(), EditBone::flag, Bone::flag, and NULL.
Referenced by ed_armature_pick_bone_impl(), ED_armature_pick_ebone_from_selectbuffer(), and ED_armature_pick_pchan_from_selectbuffer().
|
static |
| xy | Cursor coordinates (area space). |
Definition at line 325 of file armature_select.c.
References BKE_object_pose_base_array_get(), BKE_view_layer_array_from_bases_in_mode, BLI_assert, BLI_rcti_init_pt_radius(), buffer, C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ed_armature_pick_bone_from_selectbuffer_impl(), ED_view3d_viewcontext_init(), MAXPICKBUF, MEM_freeN, NULL, ViewContext::obedit, ViewContext::v3d, view3d_opengl_select_with_id_filter(), VIEW3D_SELECT_FILTER_NOP, VIEW3D_SELECT_PICK_NEAREST, and ViewContext::view_layer.
Referenced by ED_armature_pick_ebone(), and ED_armature_pick_pchan().
Definition at line 378 of file armature_select.c.
References C, and ed_armature_pick_bone_impl().
Referenced by armature_select_linked_pick_invoke(), and armature_shortest_path_pick_invoke().
| EditBone* ED_armature_pick_ebone_from_selectbuffer | ( | Base ** | bases, |
| uint | bases_len, | ||
| const uint * | buffer, | ||
| short | hits, | ||
| bool | findunsel, | ||
| bool | do_nearest, | ||
| Base ** | r_base | ||
| ) |
Definition at line 270 of file armature_select.c.
References buffer, and ed_armature_pick_bone_from_selectbuffer_impl().
| bPoseChannel* ED_armature_pick_pchan | ( | bContext * | C, |
| const int | xy[2], | ||
| bool | findunsel, | ||
| Base ** | r_base | ||
| ) |
Definition at line 384 of file armature_select.c.
References C, and ed_armature_pick_bone_impl().
Referenced by ED_armature_pick_bone().
| bPoseChannel* ED_armature_pick_pchan_from_selectbuffer | ( | Base ** | bases, |
| uint | bases_len, | ||
| const uint * | buffer, | ||
| short | hits, | ||
| bool | findunsel, | ||
| bool | do_nearest, | ||
| Base ** | r_base | ||
| ) |
Definition at line 283 of file armature_select.c.
References buffer, and ed_armature_pick_bone_from_selectbuffer_impl().
Referenced by ED_armature_pick_bone_from_selectbuffer().
|
static |
Definition at line 654 of file armature_select.c.
References BKE_view_layer_array_from_bases_in_edit_mode_unique_data, BLI_assert, BLI_findindex(), BLI_rcti_init_pt_radius(), EditBone::bone, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONESEL_ANY, BONESEL_BONE, BONESEL_ROOT, BONESEL_TIP, buffer, copy_v2_v2_int(), Object::data, ED_armature_base_and_ebone_from_select_buffer(), bArmature::edbo, EditBone::flag, len_manhattan_v2v2_int(), MAXPICKBUF, MEM_freeN, ViewContext::mval, NULL, ViewContext::obedit, result, Object::runtime, Object_Runtime::select_id, selectbuffer_ret_hits_12(), selectbuffer_ret_hits_5(), ViewContext::v3d, view3d_opengl_select_cache_begin(), view3d_opengl_select_cache_end(), view3d_opengl_select_with_id_filter(), VIEW3D_SELECT_FILTER_NOP, VIEW3D_SELECT_PICK_ALL, VIEW3D_SELECT_PICK_NEAREST, ViewContext::view_layer, WM_EVENT_CURSOR_MOTION_THRESHOLD, and XRAY_ACTIVE.
Referenced by ED_armature_edit_select_pick().
Definition at line 1816 of file armature_select.c.
References EditBone::ebone, ELEM, NULL, and EditBone::temp.
Referenced by select_similar_children().
|
static |
Definition at line 1829 of file armature_select.c.
References C, CTX_data_active_bone(), CTX_data_edit_object(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, is_ancestor(), LISTBASE_FOREACH, NC_OBJECT, ND_BONE_SELECT, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
|
static |
Definition at line 1851 of file armature_select.c.
References C, CTX_data_active_bone(), CTX_data_edit_object(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, NC_OBJECT, ND_BONE_SELECT, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
|
static |
Use for matching any pose channel data.
Definition at line 1785 of file armature_select.c.
References BKE_pose_channel_find_name(), C, CTX_data_active_bone(), CTX_data_edit_object(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, EditBone::name, NC_OBJECT, ND_BONE_SELECT, NULL, POINTER_OFFSET, Object::pose, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
Definition at line 1632 of file armature_select.c.
References angle_v3v3(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, bone_direction_worldspace_get(), C, CTX_data_active_bone(), CTX_data_edit_object(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, M_PI, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
|
static |
Definition at line 1670 of file armature_select.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_active_bone(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, EditBone::layer, LISTBASE_FOREACH, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
Definition at line 1582 of file armature_select.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, bone_length_squared_worldspace_get(), C, CTX_data_active_bone(), CTX_data_edit_object(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, len, LISTBASE_FOREACH, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
|
static |
Definition at line 1700 of file armature_select.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_string_split_prefix(), C, CTX_data_active_bone(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, MAXBONENAME, MEM_freeN, EditBone::name, NC_OBJECT, ND_BONE_SELECT, STREQ, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
|
static |
Definition at line 1867 of file armature_select.c.
References C, CTX_data_active_bone(), CTX_data_edit_object(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, NC_OBJECT, ND_BONE_SELECT, NULL, EditBone::parent, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
|
static |
Definition at line 1742 of file armature_select.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_string_split_suffix(), C, CTX_data_active_bone(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_select_set(), bArmature::edbo, Object::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, MAXBONENAME, MEM_freeN, EditBone::name, NC_OBJECT, ND_BONE_SELECT, STREQ, and WM_event_add_notifier().
Referenced by armature_select_similar_exec().
|
static |
Definition at line 640 of file armature_select.c.
Referenced by get_nearest_editbonepoint().
|
static |
Definition at line 645 of file armature_select.c.
References buffer.
Referenced by get_nearest_editbonepoint().
|
static |
Definition at line 1560 of file armature_select.c.
Referenced by ARMATURE_OT_select_similar().