diff options
author | Silc Lizard (Tokage) Renew <61938263+TokageItLab@users.noreply.github.com> | 2024-06-09 12:47:48 +0900 |
---|---|---|
committer | Silc Lizard (Tokage) Renew <61938263+TokageItLab@users.noreply.github.com> | 2024-06-10 10:19:36 +0900 |
commit | a57f9f863d13dc16839029fb895349969c3982d1 (patch) | |
tree | 85808a7907a832d8e42d04f55da68cd684260998 /scene/3d/physics | |
parent | 5833f597865c773fae3ee09fc4e31d4a243f812d (diff) | |
download | redot-engine-a57f9f863d13dc16839029fb895349969c3982d1.tar.gz |
Add get_concatenated_bone_names() to Skeleton3D for Modifier's hint
Diffstat (limited to 'scene/3d/physics')
-rw-r--r-- | scene/3d/physics/physical_bone_3d.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/scene/3d/physics/physical_bone_3d.cpp b/scene/3d/physics/physical_bone_3d.cpp index c6be2a9da8..c290f16c0d 100644 --- a/scene/3d/physics/physical_bone_3d.cpp +++ b/scene/3d/physics/physical_bone_3d.cpp @@ -738,15 +738,7 @@ bool PhysicalBone3D::_get(const StringName &p_name, Variant &r_ret) const { void PhysicalBone3D::_get_property_list(List<PropertyInfo> *p_list) const { Skeleton3D *skeleton = get_skeleton(); if (skeleton) { - String names; - for (int i = 0; i < skeleton->get_bone_count(); i++) { - if (i > 0) { - names += ","; - } - names += skeleton->get_bone_name(i); - } - - p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("bone_name"), PROPERTY_HINT_ENUM, names)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("bone_name"), PROPERTY_HINT_ENUM, skeleton->get_concatenated_bone_names())); } else { p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("bone_name"))); } |