22void find_selected_bones__visit_bone(
const bArmature *armature,
28 result.all_bones_selected &= is_selected;
29 result.no_bones_selected &= !is_selected;
35 for (Bone &child_bone : bone->childbase) {
36 find_selected_bones__visit_bone(armature, callback,
result, &child_bone);
47 find_selected_bones__visit_bone(armature, callback,
result, &root_bone);
58 auto callback = [&](
Bone *bone) { selected_bone_names.
add(bone->name); };
60 return selected_bone_names;
75 selected_bone_names.
add(pose_bone.
name);
78 return selected_bone_names;
Functions to deal with Armatures.
Object is a sort of wrapper for general info.
bool bone_is_selected(const bArmature *armature, const Bone *bone)
FunctionRef< void(Bone *bone)> SelectedBoneCallback
SelectedBonesResult BKE_armature_find_selected_bones(const bArmature *armature, SelectedBoneCallback callback)
Set< std::string > BoneNameSet
BoneNameSet BKE_armature_find_selected_bone_names(const bArmature *armature)
BoneNameSet BKE_pose_channel_find_selected_names(const Object *object)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
bArmature * BKE_armature_from_object(Object *ob)
ListBaseT< Bone > bonebase