diff options
author | jvanmourik <jacco.vanmourik@gmail.com> | 2021-12-15 01:25:30 +0100 |
---|---|---|
committer | jvanmourik <jacco.vanmourik@gmail.com> | 2021-12-15 01:25:30 +0100 |
commit | 4070f55ff0530ba3674df75d63f55e673d0b5d13 (patch) | |
tree | f6bf25c171f871921c030777aeb0bf0b65ed2c26 | |
parent | f09d88443b362326fe5c084f5c819e2c01a52d56 (diff) |
glTF animation parsing: Changed the 'loop' and 'cycle' animation name keywords to be case-insensitive
-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 1c1ee5cd10..16c413ad03 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -4889,7 +4889,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)); |