Skip to content

Commit 5337886

Browse files
committed
Fix animation loop import hints becoming lost
Fixes #75912
1 parent d8aa2c6 commit 5337886

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

editor/import/3d/scene_import_settings.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,12 @@ void SceneImportSettingsDialog::_fill_animation(Tree *p_tree, const Ref<Animatio
324324
ad.animation = p_anim;
325325

326326
_load_default_subresource_settings(ad.settings, "animations", p_name, ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_ANIMATION);
327+
if (!ad.settings.has("settings/loop_mode")) {
328+
// Update the loop mode to match detected mode (from import hints).
329+
// This is necessary on the first import of a scene, otherwise the
330+
// default (0/NONE) is set when filling out defaults.
331+
ad.settings["settings/loop_mode"] = p_anim->get_loop_mode();
332+
}
327333

328334
animation_map[p_name] = ad;
329335
}

0 commit comments

Comments
 (0)