void DoRebuildCellFiles(XLETerrainGob terrain) { if (terrain == null) { return; } terrain.Unload(); try { using (var progress = new ControlsLibrary.ProgressDialog.ProgressInterface()) { GUILayer.EditorInterfaceUtils.GenerateCellFiles( terrain.BuildEngineConfig(), terrain.UberSurfaceDirectory.LocalPath, true, LayerId, progress); } } catch (Exception e) { XLETerrainGob.Show(e, "Rebuilding cell files"); } terrain.Reload(); }
internal void DoExport(XLETerrainGob terrain) { if (terrain == null) { return; } var fileDlg = new SaveFileDialog(); fileDlg.Filter = "Tiff files|*.tiff;*.tif"; if (fileDlg.ShowDialog() == DialogResult.OK) { try { terrain.Unload(); using (var progress = new ControlsLibrary.ProgressDialog.ProgressInterface()) { GUILayer.EditorInterfaceUtils.ExecuteTerrainExport( fileDlg.FileName, terrain.BuildEngineConfig(), terrain.UberSurfaceDirectory, LayerId, progress); } terrain.Reload(); } catch { MessageBox.Show( "Export operation failed", "Terrain coverage export", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
internal void DoExport(XLETerrainGob terrain) { if (terrain == null) { return; } var fileDlg = new SaveFileDialog(); fileDlg.Filter = "Tiff files|*.tiff;*.tif"; if (fileDlg.ShowDialog() == DialogResult.OK) { try { terrain.Unload(); using (var progress = new ControlsLibrary.ProgressDialog.ProgressInterface()) { GUILayer.EditorInterfaceUtils.ExecuteTerrainExport( fileDlg.FileName, terrain.BuildEngineConfig(), terrain.UberSurfaceDirectory.LocalPath, LayerId, progress); } terrain.Reload(); } catch (Exception e) { XLETerrainGob.Show(e, "Terrain export to tiff"); } } }