Fix Skeleton2D.{_set|_get} always returning true

This commit is contained in:
kleonc
2024-08-04 12:28:53 +02:00
parent 3978628c6c
commit 115cd47fd6
2 changed files with 20 additions and 28 deletions

View File

@ -69,13 +69,13 @@ SkinReference::~SkinReference() {
///////////////////////////////////////
bool Skeleton3D::_set(const StringName &p_path, const Variant &p_value) {
String path = p_path;
#ifndef DISABLE_DEPRECATED
if (path.begins_with("animate_physical_bones")) {
if (p_path == SNAME("animate_physical_bones")) {
set_animate_physical_bones(p_value);
return true;
}
#endif
String path = p_path;
if (!path.begins_with("bones/")) {
return false;
@ -139,13 +139,13 @@ bool Skeleton3D::_set(const StringName &p_path, const Variant &p_value) {
}
bool Skeleton3D::_get(const StringName &p_path, Variant &r_ret) const {
String path = p_path;
#ifndef DISABLE_DEPRECATED
if (path.begins_with("animate_physical_bones")) {
if (p_path == SNAME("animate_physical_bones")) {
r_ret = get_animate_physical_bones();
return true;
}
#endif
String path = p_path;
if (!path.begins_with("bones/")) {
return false;