You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-30 18:30:54 +00:00
Write to animation import settings only when needed to prevent bloating the .import file
This commit is contained in:
@@ -344,11 +344,12 @@ void SceneImportSettingsDialog::_fill_animation(Tree *p_tree, const Ref<Animatio
|
||||
ad.animation = p_anim;
|
||||
|
||||
_load_default_subresource_settings(ad.settings, "animations", p_name, ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_ANIMATION);
|
||||
if (!ad.settings.has("settings/loop_mode")) {
|
||||
Animation::LoopMode loop_mode = p_anim->get_loop_mode();
|
||||
if (!ad.settings.has("settings/loop_mode") && loop_mode != Animation::LoopMode::LOOP_NONE) {
|
||||
// Update the loop mode to match detected mode (from import hints).
|
||||
// This is necessary on the first import of a scene, otherwise the
|
||||
// default (0/NONE) is set when filling out defaults.
|
||||
ad.settings["settings/loop_mode"] = p_anim->get_loop_mode();
|
||||
ad.settings["settings/loop_mode"] = loop_mode;
|
||||
}
|
||||
|
||||
animation_map[p_name] = ad;
|
||||
|
||||
Reference in New Issue
Block a user