|
Blender V5.0
|
#include <cstring>#include "DNA_action_types.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_constraint_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_listbase.h"#include "BLI_map.hh"#include "BLI_string.h"#include "BKE_action.hh"#include "BKE_armature.hh"#include "BKE_constraint.h"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_report.hh"#include "DEG_depsgraph.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_armature.hh"#include "ED_keyframing.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_object_vgroup.hh"#include "ED_outliner.hh"#include "ED_screen.hh"#include "ED_select_utils.hh"#include "ED_view3d.hh"#include "ANIM_armature.hh"#include "ANIM_bonecolor.hh"#include "ANIM_keyingsets.hh"#include "armature_intern.hh"Go to the source code of this file.
Enumerations | |
| enum class | SelectRelatedMode { SAME_COLLECTION = 0 , SAME_COLOR , SAME_KEYINGSET , CHILDREN , IMMEDIATE_CHILDREN , PARENT , SIBLINGS } |
|
strong |
| Enumerator | |
|---|---|
| SAME_COLLECTION | |
| SAME_COLOR | |
| SAME_KEYINGSET | |
| CHILDREN | |
| IMMEDIATE_CHILDREN | |
| PARENT | |
| SIBLINGS | |
Definition at line 827 of file pose_select.cc.
|
static |
Definition at line 1293 of file pose_select.cc.
References bPoseChannel::flag.
Referenced by pose_select_mirror_exec().
|
static |
Definition at line 1299 of file pose_select.cc.
References bPoseChannel::flag.
Referenced by pose_select_mirror_exec().
|
static |
Definition at line 977 of file pose_select.cc.
References POSE_SELECTED.
Referenced by pose_select_children(), pose_select_parents(), and pose_select_siblings().
| void ED_armature_pose_select_in_wpaint_mode | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| Base * | base_select ) |
While in weight-paint mode, a single pose may be active as well. While not common, it's possible we have multiple armatures deforming a mesh.
This function de-selects all other objects, and selects the new base. It can't be set to the active object because we need to keep this set to the weight paint object.
Definition at line 281 of file pose_select.cc.
References blender::ed::object::BA_DESELECT, blender::ed::object::BA_SELECT, blender::ed::object::base_select(), BASE_SELECTED, BKE_modifiers_get_virtual_modifierlist(), BKE_view_layer_active_object_get(), BKE_view_layer_base_find(), BKE_view_layer_synced_ensure(), BLI_assert, eModifierType_Armature, Base::flag, Object::mode, ModifierData::next, OB_ARMATURE, OB_MODE_ALL_WEIGHT_PAINT, ArmatureModifierData::object, and ModifierData::type.
Referenced by bone_select_menu_exec(), and ed_object_select_pick().
| bool ED_armature_pose_select_pick_bone | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d, | ||
| Object * | ob, | ||
| bPoseChannel * | pchan, | ||
| const SelectPick_Params & | params ) |
Definition at line 132 of file pose_select.cc.
References bArmature::act_bone, ARM_HAS_VIZ_DEPS, BKE_view_layer_active_object_get(), BKE_view_layer_edit_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, BLI_assert_unreachable, bPoseChannel::bone, BONE_UNSELECTABLE, Object::data, DEG_id_tag_update(), ED_pose_bone_select_tag_update(), ED_pose_deselect_all(), bArmature::flag, Bone::flag, bPoseChannel::flag, FOREACH_VISIBLE_BASE_BEGIN, FOREACH_VISIBLE_BASE_END, bArmature::id, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, Object::mode, Bone::name, OB_ARMATURE, OB_MODE_ALL_WEIGHT_PAINT, OB_MODE_POSE, params, Object::pose, POSE_SELECTED, SEL_DESELECT, SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, SEL_OP_XOR, Object::type, and blender::ed::object::vgroup_select_by_name().
Referenced by bone_select_menu_exec(), and ED_armature_pose_select_pick_with_buffer().
| bool ED_armature_pose_select_pick_with_buffer | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d, | ||
| Base * | base, | ||
| const GPUSelectResult * | hit_results, | ||
| const int | hits, | ||
| const SelectPick_Params & | params, | ||
| bool | do_nearest ) |
Definition at line 257 of file pose_select.cc.
References ED_armature_pick_pchan_from_selectbuffer(), ED_armature_pose_select_pick_bone(), Base::object, params, and Object::pose.
Referenced by ed_object_select_pick().
| void ED_pose_bone_select | ( | Object * | ob, |
| bPoseChannel * | pchan, | ||
| bool | select, | ||
| bool | change_active ) |
Utility method for changing the selection status of a bone. change_active determines whether to change the active bone of the armature when selecting pose channels. It is false during range selection otherwise true.
Definition at line 99 of file pose_select.cc.
References bArmature::act_bone, bPoseChannel::bone, blender::animrig::bone_is_selectable(), Object::data, ED_pose_bone_select_tag_update(), ELEM, bPoseChannel::flag, Object::pose, POSE_SELECTED, and select.
Referenced by click_select_channel_group(), blender::ed::object::jump_to_bone(), and select_pchan_for_action_group().
| void ED_pose_bone_select_tag_update | ( | Object * | ob | ) |
Definition at line 84 of file pose_select.cc.
References ARM_HAS_VIZ_DEPS, BLI_assert, Object::data, DEG_id_tag_update(), bArmature::flag, bArmature::id, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, NC_GEOM, NC_OBJECT, ND_BONE_SELECT, ND_DATA, OB_ARMATURE, Object::type, and WM_main_add_notifier().
Referenced by do_pose_tag_select_op_exec(), ED_armature_pose_select_pick_bone(), ED_pose_bone_select(), ED_pose_deselect_all_multi_ex(), blender::ed::object::jump_to_bone(), pose_circle_select(), pose_select_children(), pose_select_connected_invoke(), pose_select_constraint_target_exec(), pose_select_hierarchy_exec(), pose_select_linked_exec(), pose_select_parent_exec(), pose_select_parents(), pose_select_same_collection(), pose_select_same_color(), pose_select_same_keyingset(), and pose_select_siblings().
| bool ED_pose_deselect_all | ( | Object * | ob, |
| int | select_mode, | ||
| bool | ignore_visibility ) |
'select_mode' is usual SEL_SELECT/SEL_DESELECT/SEL_TOGGLE/SEL_INVERT. When true, 'ignore_visibility' makes this func also affect invisible bones (hidden or on hidden layers).
Definition at line 310 of file pose_select.cc.
References blender::animrig::bone_is_visible(), bPose::chanbase, Object::data, LISTBASE_FOREACH, Object::pose, pose_do_bone_select(), POSE_SELECTED, SEL_DESELECT, SEL_SELECT, and SEL_TOGGLE.
Referenced by click_select_channel_group(), do_pose_tag_select_op_exec(), ED_armature_pose_select_pick_bone(), ED_pose_deselect_all_multi_ex(), blender::ed::object::jump_to_bone(), and pose_circle_select().
| bool ED_pose_deselect_all_multi | ( | bContext * | C, |
| int | select_mode, | ||
| const bool | ignore_visibility ) |
Definition at line 389 of file pose_select.cc.
References BKE_object_pose_base_array_get_unique(), C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_pose_deselect_all_multi_ex(), ED_view3d_viewcontext_init(), ViewContext::scene, ViewContext::v3d, and ViewContext::view_layer.
| bool ED_pose_deselect_all_multi_ex | ( | const Span< Base * > | bases, |
| int | select_mode, | ||
| const bool | ignore_visibility ) |
Definition at line 369 of file pose_select.cc.
References ED_pose_bone_select_tag_update(), ED_pose_deselect_all(), ed_pose_is_any_selected_multi(), SEL_DESELECT, SEL_SELECT, and SEL_TOGGLE.
Referenced by ED_pose_deselect_all_multi().
|
static |
Definition at line 345 of file pose_select.cc.
References blender::animrig::bone_is_visible(), bPose::chanbase, Object::data, LISTBASE_FOREACH, Object::pose, and POSE_SELECTED.
Referenced by ed_pose_is_any_selected_multi().
Definition at line 358 of file pose_select.cc.
References ed_pose_is_any_selected().
Referenced by ED_pose_deselect_all_multi_ex().
|
static |
Definition at line 952 of file pose_select.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::animrig::bone_is_selected(), bPose::chanbase, Object::data, LISTBASE_FOREACH, and Object::pose.
Referenced by pose_select_children(), and pose_select_parents().
|
static |
Definition at line 964 of file pose_select.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), and bPoseChannel::parent.
Referenced by pose_select_children().
|
static |
Definition at line 563 of file pose_select.cc.
References ARM_HAS_VIZ_DEPS, C, CTX_DATA_BEGIN_WITH_ID, CTX_DATA_COUNT, CTX_DATA_END, CTX_data_scene(), DEG_id_tag_update(), ED_outliner_select_sync_from_pose_bone_tag(), bArmature::flag, bArmature::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, ToolSettings::multipaint, NC_OBJECT, ND_BONE_SELECT, OPERATOR_FINISHED, pose_do_bone_select(), wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_SELECT, SEL_TOGGLE, Scene::toolsettings, and WM_event_add_notifier().
Referenced by POSE_OT_select_all().
|
static |
Definition at line 61 of file pose_select.cc.
References bPoseChannel::bone, BONE_UNSELECTABLE, Bone::flag, bPoseChannel::flag, POSE_SELECTED, SEL_DESELECT, SEL_INVERT, and SEL_SELECT.
Referenced by ED_pose_deselect_all(), pose_de_select_all_exec(), pose_select_children(), pose_select_parents(), and pose_select_siblings().
| void POSE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 600 of file pose_select.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, pose_de_select_all_exec(), and WM_operator_properties_select_all().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_constraint_target | ( | wmOperatorType * | ot | ) |
Definition at line 707 of file pose_select.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_select_constraint_target_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_grouped | ( | wmOperatorType * | ot | ) |
Definition at line 1231 of file pose_select.cc.
References CHILDREN, ED_operator_posemode(), IMMEDIATE_CHILDREN, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PARENT, pose_select_grouped_exec(), RNA_def_boolean(), RNA_def_enum(), SAME_COLLECTION, SAME_COLOR, SAME_KEYINGSET, SIBLINGS, and WM_menu_invoke().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_hierarchy | ( | wmOperatorType * | ot | ) |
Definition at line 798 of file pose_select.cc.
References BONE_SELECT_CHILD, BONE_SELECT_PARENT, ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, pose_select_hierarchy_exec(), RNA_def_boolean(), and RNA_def_enum().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 546 of file pose_select.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_select_linked_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_linked_pick | ( | wmOperatorType * | ot | ) |
Definition at line 481 of file pose_select.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, pose_select_connected_invoke(), pose_select_linked_pick_poll(), PROP_SKIP_SAVE, RNA_def_boolean(), and RNA_def_property_flag().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_mirror | ( | wmOperatorType * | ot | ) |
Definition at line 1381 of file pose_select.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, pose_select_mirror_exec(), and RNA_def_boolean().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_parent | ( | wmOperatorType * | ot | ) |
Definition at line 649 of file pose_select.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_select_parent_exec().
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 991 of file pose_select.cc.
References all(), BKE_object_pose_array_get_unique(), BLI_assert, blender::animrig::bone_is_selectable(), C, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), deselect_pose_bones(), ED_pose_bone_select_tag_update(), get_selected_pose_bones(), LISTBASE_FOREACH, pose_bone_is_below_one_of(), pose_do_bone_select(), and SEL_SELECT.
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 427 of file pose_select.cc.
References bPoseChannel::bone, BONE_CONNECTED, BONE_UNSELECTABLE, C, ED_armature_pick_pchan(), ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, bPoseChannel::flag, wmEvent::mval, next, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, bPoseChannel::parent, POSE_SELECTED, wmOperator::ptr, RNA_boolean_get(), selectconnected_posebonechildren(), and view3d_operator_needs_gpu().
Referenced by POSE_OT_select_linked_pick().
|
static |
Definition at line 666 of file pose_select.cc.
References BKE_constraint_targets_flush(), BKE_constraint_targets_get(), BKE_pose_channel_find_name(), bPoseChannel::bone, BONE_UNSELECTABLE, C, CTX_DATA_BEGIN, CTX_DATA_END, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, bPoseChannel::flag, LISTBASE_FOREACH, Object::mode, OB_ARMATURE, OB_MODE_POSE, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, POSE_SELECTED, and Object::type.
Referenced by POSE_OT_select_constraint_target().
|
static |
Definition at line 1175 of file pose_select.cc.
References BKE_object_pose_armature_get(), C, CHILDREN, CTX_data_active_object(), ED_outliner_select_sync_from_pose_bone_tag(), IMMEDIATE_CHILDREN, OPERATOR_CANCELLED, OPERATOR_FINISHED, PARENT, Object::pose, pose_select_children(), pose_select_parents(), pose_select_same_collection(), pose_select_same_color(), pose_select_same_keyingset(), pose_select_siblings(), printf, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), SAME_COLLECTION, SAME_COLOR, SAME_KEYINGSET, and SIBLINGS.
Referenced by POSE_OT_select_grouped().
|
static |
Definition at line 726 of file pose_select.cc.
References bArmature::act_bone, BKE_object_pose_armature_get(), BKE_pose_channel_active_if_bonecoll_visible(), bPoseChannel::bone, BONE_CONNECTED, blender::animrig::bone_is_selectable(), BONE_SELECT_PARENT, C, bPose::chanbase, CTX_data_active_object(), Object::data, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), bPoseChannel::flag, LISTBASE_FOREACH, OPERATOR_CANCELLED, OPERATOR_FINISHED, bPoseChannel::parent, Object::pose, POSE_SELECTED, wmOperator::ptr, RNA_boolean_get(), and RNA_enum_get().
Referenced by POSE_OT_select_hierarchy().
|
static |
Definition at line 507 of file pose_select.cc.
References bPoseChannel::bone, BONE_CONNECTED, blender::animrig::bone_is_selectable(), C, CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, bPoseChannel::flag, next, OPERATOR_FINISHED, bPoseChannel::parent, POSE_SELECTED, and selectconnected_posebonechildren().
Referenced by POSE_OT_select_linked().
|
static |
Definition at line 476 of file pose_select.cc.
References C, ED_operator_posemode(), and ED_operator_view3d_active().
Referenced by POSE_OT_select_linked_pick().
|
static |
Definition at line 1307 of file pose_select.cc.
References bArmature::act_bone, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BKE_object_pose_array_get_unique(), BKE_pose_channel_get_mirrored(), bPoseChannel::bone, blender::animrig::bone_is_selectable(), blender::animrig::bone_is_visible(), bone_selection_flags_add(), bone_selection_flags_set(), C, CTX_data_active_object(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), ED_outliner_select_sync_from_pose_bone_tag(), ELEM, bArmature::id, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), Object::mode, bPoseChannel::name, NC_OBJECT, ND_BONE_SELECT, OB_MODE_WEIGHT_PAINT, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), blender::ed::object::vgroup_select_by_name(), and WM_event_add_notifier().
Referenced by POSE_OT_select_mirror().
|
static |
Definition at line 619 of file pose_select.cc.
References bArmature::act_bone, BKE_object_pose_armature_get(), bPoseChannel::bone, BONE_UNSELECTABLE, C, CTX_data_active_object(), CTX_data_active_pose_bone(), Object::data, bPoseChannel::drawflag, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, bPoseChannel::flag, OPERATOR_CANCELLED, OPERATOR_FINISHED, bPoseChannel::parent, PCHAN_DRAW_HIDDEN, and POSE_SELECTED.
Referenced by POSE_OT_select_parent().
|
static |
Definition at line 1028 of file pose_select.cc.
References BKE_object_pose_array_get_unique(), BLI_assert, blender::animrig::bone_is_selectable(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), deselect_pose_bones(), ED_pose_bone_select_tag_update(), get_selected_pose_bones(), pose_do_bone_select(), and SEL_SELECT.
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 897 of file pose_select.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), bPoseChannel::bone, BONE_UNSELECTABLE, C, Bone_Runtime::collections, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CTX_data_active_pose_bone(), CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, ED_pose_bone_select_tag_update(), Bone::flag, LISTBASE_FOREACH, POSE_SELECTED, and Bone::runtime.
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 837 of file pose_select.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::animrig::ANIM_bonecolor_posebone_get(), BONE_UNSELECTABLE, C, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CTX_data_active_pose_bone(), CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, ED_pose_bone_select_tag_update(), Bone::flag, and POSE_SELECTED.
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 1092 of file pose_select.cc.
References BKE_object_pose_armature_get(), BKE_object_pose_array_get_unique(), BKE_pose_channel_find_name(), BKE_report(), BLI_str_quoted_substr(), blender::animrig::bone_is_selectable(), BONE_UNSELECTABLE, C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, ED_pose_bone_select_tag_update(), ELEM, ListBase::first, bPoseChannel::flag, KeyingSet::flag, Object::id, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), KEYINGSET_ABSOLUTE, LISTBASE_FOREACH, bPoseChannel::name, KeyingSet::paths, Object::pose, POSE_SELECTED, RPT_ERROR, blender::animrig::scene_get_active_keyingset(), blender::animrig::SUCCESS, and blender::animrig::validate_keyingset().
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 1056 of file pose_select.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_object_pose_array_get_unique(), BLI_assert, blender::animrig::bone_is_selectable(), blender::animrig::bone_is_selected(), C, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), deselect_pose_bones(), ED_pose_bone_select_tag_update(), LISTBASE_FOREACH, pose_do_bone_select(), and SEL_SELECT.
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 400 of file pose_select.cc.
References bPoseChannel::bone, BONE_CONNECTED, BONE_UNSELECTABLE, Bone::flag, bPoseChannel::flag, if(), Object::pose, blender::animrig::pose_bone_descendent_depth_iterator(), and POSE_SELECTED.
Referenced by pose_select_connected_invoke(), and pose_select_linked_exec().