Merge pull request #109905 from TokageItLab/mod-target-name

Add lacked bone name suggestions in ModifierBoneTarget3D
This commit is contained in:
Thaddeus Crews 2025-08-24 11:04:28 -05:00
commit aa6ffa25c3
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -72,6 +72,19 @@ void ModifierBoneTarget3D::_validate_property(PropertyInfo &p_property) const {
if (p_property.name == "influence") {
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() {