From 653e2a550c5e7abe7d400f3a8e17737e1f020211 Mon Sep 17 00:00:00 2001 From: Silc 'Tokage' Renew Date: Sat, 16 Oct 2021 10:04:09 +0900 Subject: Fixed animation insertion in SkeletonEditor --- scene/3d/skeleton_3d.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'scene/3d/skeleton_3d.cpp') 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 *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; } } -- cgit v1.2.3