diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-31 17:28:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 17:28:43 +0200 |
commit | 602e967ba8fd336a230fc3ab17ef9ead7b46eae1 (patch) | |
tree | ad20bc6f3badbf4981fcc3f72e386f824a3f72aa /modules | |
parent | 475592a3bc2d2150dcbd9179fff653e3c55505a1 (diff) | |
parent | 4070f55ff0530ba3674df75d63f55e673d0b5d13 (diff) |
Merge pull request #55943 from jvanmourik/master
glTF animation parsing: Changed the 'loop' and 'cycle' animation name keywords to be case-insensitive
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gltf/gltf_document.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 4ca8482ba3..7e90f198f6 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -4938,7 +4938,8 @@ Error GLTFDocument::_parse_animations(Ref<GLTFState> state) { if (d.has("name")) { const String name = d["name"]; - if (name.begins_with("loop") || name.ends_with("loop") || name.begins_with("cycle") || name.ends_with("cycle")) { + const String name_lower = name.to_lower(); + if (name_lower.begins_with("loop") || name_lower.ends_with("loop") || name_lower.begins_with("cycle") || name_lower.ends_with("cycle")) { animation->set_loop(true); } animation->set_name(_gen_unique_animation_name(state, name)); |