|
Blender V4.3
|
#include <cstring>#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_constraint_types.h"#include "DNA_gpencil_modifier_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.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_bone_collections.hh"#include "ANIM_bonecolor.hh"#include "ANIM_keyingsets.hh"#include "armature_intern.hh"Go to the source code of this file.
Macros | |
| #define | PBONE_PREV_FLAG_GET(pchan) ((void)0, POINTER_AS_INT((pchan)->temp)) |
| #define | PBONE_PREV_FLAG_SET(pchan, val) ((pchan)->temp = POINTER_FROM_INT(val)) |
Enumerations | |
| enum | ePose_SelectSame_Mode { POSE_SEL_SAME_COLLECTION = 0 , POSE_SEL_SAME_COLOR = 1 , POSE_SEL_SAME_KEYINGSET = 2 } |
| #define PBONE_PREV_FLAG_GET | ( | pchan | ) | ((void)0, POINTER_AS_INT((pchan)->temp)) |
Definition at line 59 of file pose_select.cc.
Referenced by pose_select_mirror_exec().
| #define PBONE_PREV_FLAG_SET | ( | pchan, | |
| val ) ((pchan)->temp = POINTER_FROM_INT(val)) |
Definition at line 60 of file pose_select.cc.
Referenced by pose_select_mirror_exec().
| Enumerator | |
|---|---|
| POSE_SEL_SAME_COLLECTION | |
| POSE_SEL_SAME_COLOR | |
| POSE_SEL_SAME_KEYINGSET | |
Definition at line 825 of file pose_select.cc.
| 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 285 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, | ||
| Bone * | bone, | ||
| const SelectPick_Params * | params ) |
Definition at line 136 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, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_UNSELECTABLE, Object::data, DEG_id_tag_update(), ED_pose_bone_select_tag_update(), ED_pose_deselect_all(), bArmature::flag, Bone::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, 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 261 of file pose_select.cc.
References ED_armature_pick_bone_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 103 of file pose_select.cc.
References bArmature::act_bone, bPoseChannel::bone, BONE_SELECTED, Object::data, ED_pose_bone_select_tag_update(), ELEM, Bone::flag, PBONE_SELECTABLE, Object::pose, 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 88 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_connected_invoke(), pose_select_constraint_target_exec(), pose_select_hierarchy_exec(), pose_select_linked_exec(), pose_select_parent_exec(), pose_select_same_collection(), pose_select_same_color(), and pose_select_same_keyingset().
'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 314 of file pose_select.cc.
References BONE_SELECTED, bPose::chanbase, Object::data, bArmature::flag, LISTBASE_FOREACH, PBONE_VISIBLE, Object::pose, pose_do_bone_select(), 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().
Definition at line 393 of file pose_select.cc.
References BKE_object_pose_base_array_get_unique(), 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 373 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 349 of file pose_select.cc.
References BONE_SELECTED, bPose::chanbase, Object::data, LISTBASE_FOREACH, PBONE_VISIBLE, and Object::pose.
Referenced by ed_pose_is_any_selected_multi().
|
static |
Definition at line 362 of file pose_select.cc.
References ed_pose_is_any_selected().
Referenced by ED_pose_deselect_all_multi_ex().
|
static |
Definition at line 563 of file pose_select.cc.
References ARM_HAS_VIZ_DEPS, 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, NC_OBJECT, ND_BONE_SELECT, OPERATOR_FINISHED, pose_do_bone_select(), wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_SELECT, SEL_TOGGLE, and WM_event_add_notifier().
Referenced by POSE_OT_select_all().
|
static |
Definition at line 65 of file pose_select.cc.
References bPoseChannel::bone, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_UNSELECTABLE, Bone::flag, SEL_DESELECT, SEL_INVERT, and SEL_SELECT.
Referenced by ED_pose_deselect_all(), and pose_de_select_all_exec().
| void POSE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 600 of file pose_select.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, 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 705 of file pose_select.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_select_constraint_target_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_grouped | ( | wmOperatorType * | ot | ) |
Definition at line 1067 of file pose_select.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, POSE_SEL_SAME_COLLECTION, POSE_SEL_SAME_COLOR, POSE_SEL_SAME_KEYINGSET, pose_select_grouped_exec(), wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_hierarchy | ( | wmOperatorType * | ot | ) |
Definition at line 796 of file pose_select.cc.
References BONE_SELECT_CHILD, BONE_SELECT_PARENT, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_select_hierarchy_exec(), wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 546 of file pose_select.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_select_linked_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_linked_pick | ( | wmOperatorType * | ot | ) |
Definition at line 479 of file pose_select.cc.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_select_connected_invoke(), pose_select_linked_pick_poll(), PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_mirror | ( | wmOperatorType * | ot | ) |
Definition at line 1178 of file pose_select.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_select_mirror_exec(), RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void POSE_OT_select_parent | ( | wmOperatorType * | ot | ) |
Definition at line 647 of file pose_select.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_select_parent_exec().
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 425 of file pose_select.cc.
References BONE_CONNECTED, BONE_SELECTED, BONE_UNSELECTABLE, Bone::childbase, ED_armature_pick_bone(), ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, LISTBASE_FOREACH, wmEvent::mval, next, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, Bone::parent, wmOperator::ptr, RNA_boolean_get(), selectconnected_posebonechildren(), and view3d_operator_needs_opengl().
Referenced by POSE_OT_select_linked_pick().
|
static |
Definition at line 664 of file pose_select.cc.
References BKE_constraint_targets_flush(), BKE_constraint_targets_get(), BKE_pose_channel_find_name(), bPoseChannel::bone, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_UNSELECTABLE, CTX_DATA_BEGIN, CTX_DATA_END, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, LISTBASE_FOREACH, Object::mode, OB_ARMATURE, OB_MODE_POSE, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, and Object::type.
Referenced by POSE_OT_select_constraint_target().
|
static |
Definition at line 1027 of file pose_select.cc.
References BKE_object_pose_armature_get(), CTX_data_active_object(), ED_outliner_select_sync_from_pose_bone_tag(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, POSE_SEL_SAME_COLLECTION, POSE_SEL_SAME_COLOR, POSE_SEL_SAME_KEYINGSET, pose_select_same_collection(), pose_select_same_color(), pose_select_same_keyingset(), printf, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), and RNA_enum_get().
Referenced by POSE_OT_select_grouped().
|
static |
Definition at line 724 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, BONE_SELECT_PARENT, BONE_SELECTED, bPose::chanbase, CTX_data_active_object(), Object::data, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, LISTBASE_FOREACH, OPERATOR_CANCELLED, OPERATOR_FINISHED, bPoseChannel::parent, PBONE_SELECTABLE, Object::pose, wmOperator::ptr, RNA_boolean_get(), and RNA_enum_get().
Referenced by POSE_OT_select_hierarchy().
|
static |
Definition at line 505 of file pose_select.cc.
References BONE_CONNECTED, BONE_SELECTED, Bone::childbase, CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, LISTBASE_FOREACH, next, OPERATOR_FINISHED, Bone::parent, PBONE_SELECTABLE, and selectconnected_posebonechildren().
Referenced by POSE_OT_select_linked().
|
static |
Definition at line 474 of file pose_select.cc.
References ED_operator_posemode(), and ED_operator_view3d_active().
Referenced by POSE_OT_select_linked_pick().
|
static |
Definition at line 1111 of file pose_select.cc.
References bArmature::act_bone, BKE_object_pose_array_get_unique(), BKE_pose_channel_get_mirrored(), bPoseChannel::bone, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, 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, Bone::flag, flag, bArmature::id, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, Object::mode, bPoseChannel::name, NC_OBJECT, ND_BONE_SELECT, OB_MODE_WEIGHT_PAINT, OPERATOR_FINISHED, PBONE_PREV_FLAG_GET, PBONE_PREV_FLAG_SET, PBONE_SELECTABLE, PBONE_VISIBLE, 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_HIDDEN_P, BONE_SELECTED, BONE_UNSELECTABLE, CTX_data_active_object(), CTX_data_active_pose_bone(), Object::data, ED_outliner_select_sync_from_pose_bone_tag(), ED_pose_bone_select_tag_update(), Bone::flag, OPERATOR_CANCELLED, OPERATOR_FINISHED, and bPoseChannel::parent.
Referenced by POSE_OT_select_parent().
|
static |
Definition at line 891 of file pose_select.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), bPoseChannel::bone, BONE_SELECTED, BONE_UNSELECTABLE, 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, and Bone::runtime.
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 831 of file pose_select.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::animrig::ANIM_bonecolor_posebone_get(), BONE_SELECTED, BONE_UNSELECTABLE, 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(), and Bone::flag.
Referenced by pose_select_grouped_exec().
|
static |
Definition at line 945 of file pose_select.cc.
References ANIM_scene_get_active_keyingset(), ANIM_validate_keyingset(), BKE_object_pose_armature_get(), BKE_object_pose_array_get_unique(), BKE_pose_channel_find_name(), BKE_report(), BLI_str_quoted_substr(), bPoseChannel::bone, BONE_SELECTED, BONE_UNSELECTABLE, 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, Bone::flag, KeyingSet::flag, Object::id, KEYINGSET_ABSOLUTE, LISTBASE_FOREACH, bPoseChannel::name, KeyingSet::paths, PBONE_SELECTABLE, Object::pose, RPT_ERROR, and blender::animrig::SUCCESS.
Referenced by pose_select_grouped_exec().
Definition at line 404 of file pose_select.cc.
References BONE_CONNECTED, BONE_SELECTED, BONE_UNSELECTABLE, Bone::childbase, Bone::flag, LISTBASE_FOREACH, and selectconnected_posebonechildren().
Referenced by pose_select_connected_invoke(), pose_select_linked_exec(), and selectconnected_posebonechildren().