diff options
author | Hakim <hakim.rouatbi@gmail.com> | 2022-08-09 19:39:58 +0200 |
---|---|---|
committer | Hakim <hakim.rouatbi@gmail.com> | 2022-08-10 11:17:29 +0200 |
commit | 805ffdfbf6841ac19c6fdbf3425a6ff15115bed7 (patch) | |
tree | 8d0cf1af26b4316a1a9fe9618a1b53b0cfe9ee90 /modules/gltf/gltf_document.cpp | |
parent | 94a8065ae4ae19b814bc9b02d41358d55d3cf813 (diff) | |
download | redot-engine-805ffdfbf6841ac19c6fdbf3425a6ff15115bed7.tar.gz |
Prevent AnimationPlayer from being added on GLTF import if the option is unchecked. Fixes #63954
Diffstat (limited to 'modules/gltf/gltf_document.cpp')
-rw-r--r-- | modules/gltf/gltf_document.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 7e90f198f6..d102970932 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -6899,7 +6899,7 @@ Node *GLTFDocument::generate_scene(Ref<GLTFState> state, int32_t p_bake_fps) { Node *root = gltf_root_node->get_parent(); ERR_FAIL_NULL_V(root, nullptr); _process_mesh_instances(state, root); - if (state->animations.size()) { + if (state->get_create_animations() && state->animations.size()) { AnimationPlayer *ap = memnew(AnimationPlayer); root->add_child(ap, true); ap->set_owner(root); |