Add lacked bone name suggestions in ModifierBoneTarget3D

This commit is contained in:
Silc Lizard (Tokage) Renew
2025-08-23 21:22:32 +09:00
parent c81fd6c512
commit 0771746495

View File

@@ -72,6 +72,19 @@ void ModifierBoneTarget3D::_validate_property(PropertyInfo &p_property) const {
if (p_property.name == "influence") { if (p_property.name == "influence") {
p_property.usage = PROPERTY_USAGE_READ_ONLY; p_property.usage = PROPERTY_USAGE_READ_ONLY;
} }
if (!Engine::get_singleton()->is_editor_hint()) {
return;
}
if (p_property.name == "bone_name") {
Skeleton3D *skeleton = get_skeleton();
if (skeleton) {
p_property.hint = PROPERTY_HINT_ENUM;
p_property.hint_string = skeleton->get_concatenated_bone_names();
} else {
p_property.hint = PROPERTY_HINT_NONE;
p_property.hint_string = "";
}
}
} }
void ModifierBoneTarget3D::_bind_methods() { void ModifierBoneTarget3D::_bind_methods() {