Skip to content

Commit 3619c68

Browse files
committed
Merge pull request #91634 from jogly/gilley/fix-anim-loop-import
Fix animation loop import hints becoming lost
2 parents 640109e + 5337886 commit 3619c68

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
@@ -343,6 +343,12 @@ void SceneImportSettingsDialog::_fill_animation(Tree *p_tree, const Ref<Animatio
343343
ad.animation = p_anim;
344344

345345
_load_default_subresource_settings(ad.settings, "animations", p_name, ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_ANIMATION);
346+
if (!ad.settings.has("settings/loop_mode")) {
347+
// Update the loop mode to match detected mode (from import hints).
348+
// This is necessary on the first import of a scene, otherwise the
349+
// default (0/NONE) is set when filling out defaults.
350+
ad.settings["settings/loop_mode"] = p_anim->get_loop_mode();
351+
}
346352

347353
animation_map[p_name] = ad;
348354
}

0 commit comments

Comments
 (0)