Skip to content

Commit 0771746

Browse files
committed
Add lacked bone name suggestions in ModifierBoneTarget3D
1 parent c81fd6c commit 0771746

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scene/3d/modifier_bone_target_3d.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,19 @@ void ModifierBoneTarget3D::_validate_property(PropertyInfo &p_property) const {
7272
if (p_property.name == "influence") {
7373
p_property.usage = PROPERTY_USAGE_READ_ONLY;
7474
}
75+
if (!Engine::get_singleton()->is_editor_hint()) {
76+
return;
77+
}
78+
if (p_property.name == "bone_name") {
79+
Skeleton3D *skeleton = get_skeleton();
80+
if (skeleton) {
81+
p_property.hint = PROPERTY_HINT_ENUM;
82+
p_property.hint_string = skeleton->get_concatenated_bone_names();
83+
} else {
84+
p_property.hint = PROPERTY_HINT_NONE;
85+
p_property.hint_string = "";
86+
}
87+
}
7588
}
7689

7790
void ModifierBoneTarget3D::_bind_methods() {

0 commit comments

Comments
 (0)