Make import preview of blend files visible

Unlike other scene imports, the import of blend files requires options. Otherwise, the preview may not be visible.
This commit is contained in:
Rindbee
2022-07-01 20:03:40 +08:00
parent a2459c7d35
commit d9709e151b
3 changed files with 14 additions and 9 deletions

View File

@@ -538,12 +538,6 @@ void SceneImportSettings::open_settings(const String &p_path, bool p_for_animati
scene_import_settings_data->settings = nullptr;
scene_import_settings_data->path = p_path;
scene = ResourceImporterScene::get_scene_singleton()->pre_import(p_path); // Use the scene singleton here because we want to see the full thing.
if (scene == nullptr) {
EditorNode::get_singleton()->show_warning(TTR("Error opening scene"));
return;
}
// Visibility
data_mode->set_tab_hidden(1, p_for_animation);
data_mode->set_tab_hidden(2, p_for_animation);
@@ -589,6 +583,12 @@ void SceneImportSettings::open_settings(const String &p_path, bool p_for_animati
}
}
scene = ResourceImporterScene::get_scene_singleton()->pre_import(p_path, defaults); // Use the scene singleton here because we want to see the full thing.
if (scene == nullptr) {
EditorNode::get_singleton()->show_warning(TTR("Error opening scene"));
return;
}
first_aabb = true;
_update_scene();