summaryrefslogtreecommitdiffstats
path: root/scene/resources/skeleton_profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/skeleton_profile.cpp')
-rw-r--r--scene/resources/skeleton_profile.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/resources/skeleton_profile.cpp b/scene/resources/skeleton_profile.cpp
index 369d72f801..bc1c55c614 100644
--- a/scene/resources/skeleton_profile.cpp
+++ b/scene/resources/skeleton_profile.cpp
@@ -271,6 +271,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;