diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-24 10:05:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-24 10:05:00 +0200 |
commit | c7b78b9538de7923882bda2849339bef7405654f (patch) | |
tree | ae51cf6d5c0865cb12e611d7e395b3375405ec83 /scene/3d | |
parent | b2ab5cb504cef1ffe229523d63b997d5306afce3 (diff) | |
parent | 653e2a550c5e7abe7d400f3a8e17737e1f020211 (diff) |
Merge pull request #53885 from TokageItLab/fix-bone-animation-insertion
Fixed Pos/Rot/Scl 3D Tracks insertion in `SkeletonEditor`
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/skeleton_3d.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index fbc3767151..e3744ad5e9 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -178,32 +178,32 @@ void Skeleton3D::_get_property_list(List<PropertyInfo> *p_list) const { } void Skeleton3D::_validate_property(PropertyInfo &property) const { - PackedStringArray spr = property.name.split("/"); - if (spr.size() == 3 && spr[0] == "bones") { - if (spr[2] == "rest") { + PackedStringArray split = property.name.split("/"); + if (split.size() == 3 && split[0] == "bones") { + if (split[2] == "rest") { property.usage |= PROPERTY_USAGE_READ_ONLY; } if (is_show_rest_only()) { - if (spr[2] == "enabled") { + if (split[2] == "enabled") { property.usage |= PROPERTY_USAGE_READ_ONLY; } - if (spr[2] == "position") { + if (split[2] == "position") { property.usage |= PROPERTY_USAGE_READ_ONLY; } - if (spr[2] == "rotation") { + if (split[2] == "rotation") { property.usage |= PROPERTY_USAGE_READ_ONLY; } - if (spr[2] == "scale") { + if (split[2] == "scale") { property.usage |= PROPERTY_USAGE_READ_ONLY; } - } else if (!is_bone_enabled(spr[1].to_int())) { - if (spr[2] == "position") { + } else if (!is_bone_enabled(split[1].to_int())) { + if (split[2] == "position") { property.usage |= PROPERTY_USAGE_READ_ONLY; } - if (spr[2] == "rotation") { + if (split[2] == "rotation") { property.usage |= PROPERTY_USAGE_READ_ONLY; } - if (spr[2] == "scale") { + if (split[2] == "scale") { property.usage |= PROPERTY_USAGE_READ_ONLY; } } |