public async Task ReloadCurrentFileAsync() { if (this.IsLoading) { return; } this.IsLoading = true; try { m_currentFile.EnsureNotNull(nameof(m_currentFile)); m_currentImportOptions.EnsureNotNull(nameof(m_currentImportOptions)); await CloseAsync( clearCurrentFileInfo : false); await m_scene.ImportAsync(m_currentFile, m_currentImportOptions); } finally { this.IsLoading = false; } base.Messenger.Publish <NewModelLoadedMessage>(); }
public async Task ReloadCurrentFileAsync() { m_currentFile.EnsureNotNull(nameof(m_currentFile)); m_currentImportOptions.EnsureNotNull(nameof(m_currentImportOptions)); await CloseAsync( clearCurrentFileInfo : false); await m_renderLoop.Scene.ImportAsync(m_currentFile, m_currentImportOptions); await m_renderLoop.WaitForNextFinishedRenderAsync(); await SetInitialCameraPositionAsync(); }