diff options
Diffstat (limited to 'scene/resources/skeleton_profile.cpp')
-rw-r--r-- | scene/resources/skeleton_profile.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/resources/skeleton_profile.cpp b/scene/resources/skeleton_profile.cpp index c2d77ec7ff..2a1b64078a 100644 --- a/scene/resources/skeleton_profile.cpp +++ b/scene/resources/skeleton_profile.cpp @@ -269,6 +269,14 @@ int SkeletonProfile::find_bone(const StringName &p_bone_name) const { return -1; } +PackedStringArray SkeletonProfile::get_bone_names() { + PackedStringArray s; + for (const SkeletonProfileBone &bone : bones) { + s.push_back(bone.bone_name); + } + return s; +} + StringName SkeletonProfile::get_bone_name(int p_bone_idx) const { ERR_FAIL_INDEX_V(p_bone_idx, bones.size(), StringName()); return bones[p_bone_idx].bone_name; |