Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: ExportSurface.cs
- ===================================================================
- --- ExportSurface.cs (revision 6363)
- +++ ExportSurface.cs (working copy)
- @@ -24,12 +24,11 @@
- public override bool RunImp(Task task, AppEnv appEnv, bool withChildren)
- {
- - string tempDir = appEnv.TempDir + @"export-surface\";
- - string cutinDir = tempDir + @"rrr_and_airfields_cutin\";
- - string filterByPropertiesDir = tempDir + @"filter-by-properties-luas\";
- - string airfieldSurfaceDir = tempDir + @"airfield-surface\";
- - string airfieldSuperficialDir = tempDir + @"airfield-superficial\";
- - string tempSurfaceDir = tempDir + @"airfield-temp\";
- + string cutinDir = appEnv.SurfaceTempDir + @"rrr_and_airfields_cutin\";
- + string filterByPropertiesDir = appEnv.SurfaceTempDir + @"filter-by-properties-luas\";
- + string airfieldSurfaceDir = appEnv.SurfaceTempDir + @"airfield-surface\";
- + string airfieldSuperficialDir = appEnv.SurfaceTempDir + @"airfield-superficial\";
- + string tempSurfaceDir = appEnv.SurfaceTempDir + @"airfield-temp\";
- string terrainCfg = appEnv.vars["TERRAIN_CONFIG"].StringValue;
- string rrrOutput = appEnv.vars["RRR_OUTPUT"].StringValue;
- @@ -39,8 +38,8 @@
- task.AddVariables(SettingsPanel.vars);
- - System.IO.Directory.CreateDirectory(tempDir);
- - Tools.Path.CleanupDir(tempDir);
- + System.IO.Directory.CreateDirectory(appEnv.SurfaceTempDir);
- + Tools.Path.CleanupDir(appEnv.SurfaceTempDir);
- System.IO.Directory.CreateDirectory(cutinDir);
- System.IO.Directory.CreateDirectory(filterByPropertiesDir);
- System.IO.Directory.CreateDirectory(airfieldSurfaceDir);
- @@ -48,10 +47,10 @@
- if (appEnv.terrainConfig.Lsa5)
- {
- - tempDir = appEnv.TempDir + @"export-lsa5\";
- + string Lsa5TempDir = appEnv.TempDir + @"export-lsa5\";
- // apply-surface-types & merge
- - string mergedsurface = tempDir + @"merged_surface.ofsh";
- + string mergedsurface = Lsa5TempDir + @"merged_surface.ofsh";
- {
- List<string> surfaceMeshes = new List<string>();
- @@ -59,7 +58,7 @@
- foreach (var surface in surfaceL0_)
- {
- string surfaceFile = surface.FilenameNoExtension();
- - string surfaceFileRenamed = tempDir + surfaceFile + ".ofsh";
- + string surfaceFileRenamed = Lsa5TempDir + surfaceFile + ".ofsh";
- command = new Command();
- command.EdtuCommand = "apply-surface-types";
- @@ -74,7 +73,7 @@
- foreach (var airfield in airfields)
- {
- string airfieldFile = airfield.FilenameNoExtension();
- - string airfieldFileRenamed = tempDir + airfieldFile + ".ofsh";
- + string airfieldFileRenamed = Lsa5TempDir + airfieldFile + ".ofsh";
- command = new Command();
- command.EdtuCommand = "apply-surface-types";
- @@ -91,8 +90,8 @@
- // link-vector-data
- - string mergedvectordata = tempDir + @"merged_vectordata.ofsh";
- - string linkedvectordata = tempDir + @"merged_vectordata.lnkd";
- + string mergedvectordata = Lsa5TempDir + @"merged_vectordata.ofsh";
- + string linkedvectordata = Lsa5TempDir + @"merged_vectordata.lnkd";
- {
- string[] vectordata = PathsFromCategory(appEnv, Project.VECTOR_DATA_5_CATEGORY);
- command = MergeOffshoresCommand(vectordata, mergedvectordata);
- @@ -104,12 +103,12 @@
- + linkedvectordata.Enclose() + " "
- + "-staticmesh " + mergedsurface.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"link-vector-data_errors.ofsh"; ;
- + command.ErrorsFile = Lsa5TempDir + @"link-vector-data_errors.ofsh"; ;
- task.AddCommand(command);
- }
- // build-lsa5
- - string lsa5filename = tempDir + @"surface.lsa5";
- + string lsa5filename = Lsa5TempDir + @"surface.lsa5";
- {
- command = new Command();
- command.EdtuCommand = "build-lsa5";
- @@ -117,7 +116,7 @@
- + linkedvectordata.Enclose() + " "
- + lsa5filename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"build-lsa5_errors.ofsh"; ;
- + command.ErrorsFile = Lsa5TempDir + @"build-lsa5_errors.ofsh"; ;
- task.AddCommand(command);
- }
- @@ -127,9 +126,9 @@
- command.Type = Command.CommandType.EDTU4;
- command.EdtuCommand = "export-vector-data";
- command.Args = linkedvectordata.Enclose() + " "
- - + (tempDir + @"vectordata_view.ofsh").Enclose()
- + + (Lsa5TempDir + @"vectordata_view.ofsh").Enclose()
- + " -terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"export-vector-data_errors.ofsh";
- + command.ErrorsFile = Lsa5TempDir + @"export-vector-data_errors.ofsh";
- task.AddCommand(command);
- }
- @@ -142,7 +141,7 @@
- command.Args = lsa5filename.Enclose() + " "
- + lsa4filename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"lsa5-lsa4_errors.ofsh"; ;
- + command.ErrorsFile = Lsa5TempDir + @"lsa5-lsa4_errors.ofsh"; ;
- task.AddCommand(command);
- return true;
- @@ -152,11 +151,10 @@
- {
- string seaMaterial = "Sea4.1";
- - tempDir = appEnv.TempDir + @"export-lsa4-with-vector-data-5\";
- - System.IO.Directory.CreateDirectory(tempDir);
- - Tools.Path.CleanupDir(tempDir);
- + System.IO.Directory.CreateDirectory(appEnv.SurfaceTempDir);
- + Tools.Path.CleanupDir(appEnv.SurfaceTempDir);
- // apply-surface-types & merge
- - string mergedsurface = tempDir + @"merged-surface.ofsh";
- + string mergedsurface = appEnv.SurfaceTempDir + @"merged-surface.ofsh";
- {
- List<string> surfaceMeshes = new List<string>();
- @@ -164,8 +162,8 @@
- foreach (var surface in surfaceL0_)
- surfaceMeshes.Add(surface);
- - string premergedsurface = tempDir + @"pre-merged-surface.ofsh";
- - string elevatingsurface = tempDir + @"elevated-surface.ofsh";
- + string premergedsurface = appEnv.SurfaceTempDir + @"pre-merged-surface.ofsh";
- + string elevatingsurface = appEnv.SurfaceTempDir + @"elevated-surface.ofsh";
- task.AddCommand(Operation.MergeOffshoresCommand(surfaceMeshes.ToArray(), premergedsurface));
- // apply-surface-types
- @@ -172,7 +170,7 @@
- command = new Command();
- command.EdtuCommand = "apply-surface-types";
- command.Args = premergedsurface.Enclose() + " " + elevatingsurface.Enclose() + " -defaulttype surface";
- - command.ErrorsFile = tempDir + "apply-surface-types-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "apply-surface-types-errors.ofsh";
- task.AddCommand(command);
- // elevate-static-surface
- @@ -180,7 +178,7 @@
- command.EdtuCommand = "elevate-static-surface";
- command.Args = elevatingsurface.Enclose() + " " + mergedsurface.Enclose();
- command.Args += " -terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + "elevate-static-surface-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "elevate-static-surface-errors.ofsh";
- task.AddCommand(command);
- }
- @@ -192,15 +190,15 @@
- bool needBuildSurfaceL2 = surfaceL2.Length > 0;
- /////////////////////////////////////
- // L2
- - var surfacefilenameL2 = tempDir + "surface-L2.ofsh";
- + var surfacefilenameL2 = appEnv.SurfaceTempDir + "surface-L2.ofsh";
- {
- - var mergedfilenameL2 = tempDir + "merged-L2.ofsh";
- + var mergedfilenameL2 = appEnv.SurfaceTempDir + "merged-L2.ofsh";
- if (needBuildSurfaceL2)
- {
- command = MergeOffshoresCommand(surfaceL2, mergedfilenameL2);
- task.AddCommand(command);
- - var buildedfilenameL2 = tempDir + "builded-L2.ofsh";
- + var buildedfilenameL2 = appEnv.SurfaceTempDir + "builded-L2.ofsh";
- command = new Command();
- command.EdtuCommand = "build-surface-lod2";
- command.Args = "-i " + mergedfilenameL2.Enclose() + " "
- @@ -210,7 +208,7 @@
- + "-linked " + appEnv.VectorData5OutputLnkd.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose()
- ;
- - command.ErrorsFile = tempDir + @"build-surface-lod2-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"build-surface-lod2-errors.ofsh";
- task.AddCommand(command);
- surfacefilenameL2 = buildedfilenameL2;
- }
- @@ -217,9 +215,9 @@
- }
- // L1
- - string surfaceL1 = tempDir + @"surface-L1.ofsh";
- + string surfaceL1 = appEnv.SurfaceTempDir + @"surface-L1.ofsh";
- {
- - var srcL1 = tempDir + "src-L1.ofsh";
- + var srcL1 = appEnv.SurfaceTempDir + "src-L1.ofsh";
- var l1paths = PathsFromCategory(appEnv, appEnv.Project.SurfaceLod(1));
- @@ -233,7 +231,7 @@
- command = new Command();
- command.EdtuCommand = "apply-surface-types";
- command.Args = srcL1.Enclose() + " " + srcL1.Enclose() + " -defaulttype surface";
- - command.ErrorsFile = tempDir + "apply-surface-types-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "apply-surface-types-errors.ofsh";
- task.AddCommand(command);
- }
- else
- @@ -247,12 +245,12 @@
- + "-seamaterial " + seaMaterial + " "
- + "-linked " + appEnv.VectorData5OutputLnkd.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"build-surface-lod1-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"build-surface-lod1-errors.ofsh";
- task.AddCommand(command);
- }
- // build-surface-by-vector-data-5
- - string surfaceL0_1 = tempDir + @"surface-L0.ofsh";
- + string surfaceL0_1 = appEnv.SurfaceL0Output;
- string outputReflectReceiver = appEnv.ReflectReceiverScene;
- {
- command = new Command();
- @@ -266,13 +264,13 @@
- + "-seaUndeterminatedValid "
- + "-reflectreceiver " + outputReflectReceiver.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"build-surface-by-vector-data-5-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"build-surface-by-vector-data-5-errors.ofsh";
- // command.IsCriticalCommand = true;
- task.AddCommand(command);
- }
- // elevate-surface-lod1
- - string surfaceL1Elevated = tempDir + @"surface-L1.ofsh";
- + string surfaceL1Elevated = appEnv.SurfaceTempDir + @"surface-L1.ofsh";
- {
- command = new Command();
- command.EdtuCommand = "elevate-surface-lod1";
- @@ -279,11 +277,11 @@
- command.Args = surfaceL1.Enclose() + " "
- + surfaceL1Elevated.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"elevate-surface-lod1-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"elevate-surface-lod1-errors.ofsh";
- //task.AddCommand(command);
- }
- - string cutL0filename = tempDir + @"cut-by-squares.ofsh";
- + string cutL0filename = appEnv.SurfaceTempDir + @"cut-by-squares.ofsh";
- command = new Command();
- command.EdtuCommand = "cut-by-squares";
- command.Args = surfaceL0_1.Enclose() + " "
- @@ -290,10 +288,10 @@
- + cutL0filename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose() + " "
- + "-squaresize " + squareSizeL0 + " ";
- - command.ErrorsFile = tempDir + "cut-by-squares-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "cut-by-squares-errors.ofsh";
- task.AddCommand(command);
- - string cutL1filename = tempDir + @"cut-by-squares-lod1.ofsh";
- + string cutL1filename = appEnv.SurfaceTempDir + @"cut-by-squares-lod1.ofsh";
- command = new Command();
- command.EdtuCommand = "cut-by-squares";
- command.Args = surfaceL1.Enclose() + " "
- @@ -300,10 +298,10 @@
- + cutL1filename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose() + " "
- + "-squaresize " + squareSizeL1 + " ";
- - command.ErrorsFile = tempDir + "cut-by-squares-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "cut-by-squares-errors.ofsh";
- task.AddCommand(command);
- - string cutL2filename = tempDir + @"cut-by-squares-lod2.ofsh";
- + string cutL2filename = appEnv.SurfaceTempDir + @"cut-by-squares-lod2.ofsh";
- if (needBuildSurfaceL2)
- {
- command = new Command();
- @@ -312,7 +310,7 @@
- + cutL2filename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose() + " "
- + "-squaresize " + squareSizeL2 + " ";
- - command.ErrorsFile = tempDir + "cut-by-squares-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "cut-by-squares-errors.ofsh";
- task.AddCommand(command);
- }
- @@ -327,7 +325,7 @@
- + "-domerge "
- + (appEnv.terrainConfig.SurfaceLodsBleding ? "-surface-lods-blending " : "")
- ;
- - command.ErrorsFile = tempDir + "export-lsa4-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "export-lsa4-errors.ofsh";
- task.AddCommand(command);
- return true;
- @@ -420,7 +418,7 @@
- // * towns mesh
- meshes.Add(rrrOutput);
- meshes.Add(townOutput);
- - string mergedMeshes = tempDir + @"merged_meshes.ofsh";
- + string mergedMeshes = appEnv.SurfaceTempDir + @"merged_meshes.ofsh";
- command = MergeOffshoresCommand(meshes.ToArray(), mergedMeshes);
- task.AddCommand(command);
- @@ -438,7 +436,7 @@
- command = new Command();
- command.EdtuCommand = "roughcutin_mesh";
- command.Args = args + " -ignoreonlay -ignorefreese";
- - command.ErrorsFile = tempDir + @"errors_rrr_airfields_cutin_to_" + name;
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"errors_rrr_airfields_cutin_to_" + name;
- task.AddCommand(command);
- }
- foreach (var surface in surfaceL0)
- @@ -452,8 +450,8 @@
- if (exportToLsa3)
- {
- // for LSA3 only
- - string surfaceDir = tempDir + @"surface";
- - string lsa3cache = tempDir + @"lsa3cache";
- + string surfaceDir = appEnv.SurfaceTempDir + @"surface";
- + string lsa3cache = appEnv.SurfaceTempDir + @"lsa3cache";
- string lsa3file = appEnv.vars["LSA3_FILE"].StringValue;
- string onlaySup3file = appEnv.vars["ONLAYSUP3_FILE"].StringValue;
- @@ -473,7 +471,7 @@
- {
- command = new Command();
- command.EdtuCommand = "cutbysquares";
- - command.ErrorsFile = tempDir + @"errors_cut_" + System.IO.Path.GetFileName(name);
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"errors_cut_" + System.IO.Path.GetFileName(name);
- command.Args = Enclose(name) + " "
- + Enclose(surfaceDir) + " "
- + "10000 "
- @@ -491,7 +489,7 @@
- command = new Command();
- command.EdtuCommand = "cutbysquares";
- - command.ErrorsFile = tempDir + @"errors_cut_L2_" + name;
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"errors_cut_L2_" + name;
- command.Args = Enclose(surface) + " "
- + Enclose(surfaceDir) + " "
- + "20000 "
- @@ -503,7 +501,7 @@
- {
- command = new Command();
- command.EdtuCommand = "offshore-assemble-lsa3";
- - command.ErrorsFile = tempDir + @"errors_offshore-assemble-lsa3.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"errors_offshore-assemble-lsa3.ofsh";
- command.Args = Enclose(surfaceDir) + " "
- + Enclose(lsa3file)
- + " -terrain " + Enclose(terrainCfg)
- @@ -514,15 +512,15 @@
- // onlays
- {
- - string mergedOnlays = tempDir + @"merged_onlays.ofsh";
- + string mergedOnlays = appEnv.SurfaceTempDir + @"merged_onlays.ofsh";
- command = MergeOffshoresCommand(onlays.ToArray(), mergedOnlays);
- task.AddCommand(command);
- // По высоте lsa3
- - string mergedOnlaysOnLsa3 = tempDir + @"merged_onlays_lsa3.ofsh";
- + string mergedOnlaysOnLsa3 = appEnv.SurfaceTempDir + @"merged_onlays_lsa3.ofsh";
- command = new Command();
- command.EdtuCommand = "projectiontolsa3";
- - command.ErrorsFile = tempDir + @"errors_projectiontolsa3.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"errors_projectiontolsa3.ofsh";
- command.Args = Enclose(mergedOnlays) + " "
- + Enclose(mergedOnlaysOnLsa3)
- + " -terrain " + Enclose(terrainCfg);
- @@ -531,7 +529,7 @@
- // РРєСЃРїРѕСЂС‚ sup3
- command = new Command();
- command.EdtuCommand = "offshore-sup3";
- - command.ErrorsFile = tempDir + @"errors_onlaystosup3.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"errors_onlaystosup3.ofsh";
- command.Args = Enclose(mergedOnlaysOnLsa3) + " "
- + Enclose(onlaySup3file)
- + " -terrain " + Enclose(terrainCfg);
- @@ -544,13 +542,13 @@
- {
- double weld = 0.1;
- - string errorsFile = tempDir + "surfaceL0_errors.ofsh";
- - string errorsFileRocksArea = tempDir + "rocksArea_errors.ofsh";
- - string errorsFileRocks = tempDir + "rocks_errors.ofsh";
- - string errorsFileCut = tempDir + "cutL0_errors.ofsh";
- - string errorsFileLSA4 = tempDir + "LSA4_errors.ofsh";
- - string errorsFileMerge = tempDir + "merge_errors.ofsh";
- - string errorsFileMergeRocks = tempDir + "mergeRocks_errors.ofsh";
- + string errorsFile = appEnv.SurfaceTempDir + "surfaceL0_errors.ofsh";
- + string errorsFileRocksArea = appEnv.SurfaceTempDir + "rocksArea_errors.ofsh";
- + string errorsFileRocks = appEnv.SurfaceTempDir + "rocks_errors.ofsh";
- + string errorsFileCut = appEnv.SurfaceTempDir + "cutL0_errors.ofsh";
- + string errorsFileLSA4 = appEnv.SurfaceTempDir + "LSA4_errors.ofsh";
- + string errorsFileMerge = appEnv.SurfaceTempDir + "merge_errors.ofsh";
- + string errorsFileMergeRocks = appEnv.SurfaceTempDir + "mergeRocks_errors.ofsh";
- // FAILED
- string terrainCfgDir =
- @@ -558,19 +556,19 @@
- string lsa4output = terrainCfgDir + @"Surface\"
- + AppEnv.Instance.TerrainName + ".lsa4";
- - var mergedfilename = tempDir + "sourceL0.ofsh";
- + var mergedfilename = appEnv.SurfaceTempDir + "sourceL0.ofsh";
- command = MergeOffshoresCommand(cutbysquares.ToArray(), mergedfilename);
- task.AddCommand(command);
- - var surfaceL0filename = tempDir + "surfaceL0.ofsh";
- - var mergedL0filename = tempDir + "mergedL0.ofsh";
- - var finalL0filename = tempDir + "finalL0.ofsh";
- - var cutL0filename = tempDir + "cutL0.ofsh";
- + var surfaceL0filename = appEnv.SurfaceL0Output;
- + var mergedL0filename = appEnv.SurfaceTempDir + "mergedL0.ofsh";
- + var finalL0filename = appEnv.SurfaceTempDir + "finalL0.ofsh";
- + var cutL0filename = appEnv.SurfaceTempDir + "cutL0.ofsh";
- var splines = appEnv.TempDir + @"export-rrr\merged.ofsh";
- var meshDataFilename = appEnv.TempDir + @"export-towns\merged.ofsh";
- - var cutRocksFilename = tempDir + "rockArea.ofsh";
- - var rocksFilename = tempDir + "rocks.ofsh";
- - var mergedRocksFilename = tempDir + "mergedRocks.ofsh";
- + var cutRocksFilename = appEnv.SurfaceTempDir + "rockArea.ofsh";
- + var rocksFilename = appEnv.SurfaceTempDir + "rocks.ofsh";
- + var mergedRocksFilename = appEnv.SurfaceTempDir + "mergedRocks.ofsh";
- command = new Command();
- command.EdtuCommand = "build-surface";
- @@ -592,10 +590,10 @@
- task.AddCommand(command);
- // forests
- - var outputMergedForests = tempDir + "extruded-merged-forests.ofsh";
- - var outputMergedGroundsForests = tempDir + "extruded-merged-forests-grounds.ofsh";
- + var outputMergedForests = appEnv.SurfaceTempDir + "extruded-merged-forests.ofsh";
- + var outputMergedGroundsForests = appEnv.SurfaceTempDir + "extruded-merged-forests-grounds.ofsh";
- {
- - string scene_mergedfilename = tempDir + @"scene_merged.ofsh";
- + string scene_mergedfilename = appEnv.SurfaceTempDir + @"scene_merged.ofsh";
- List<string> scenes = new List<string>();
- scenes.Add(appEnv.vars["RRR_SCENE_OUTPUT"].StringValue);
- scenes.AddRange(PathsFromCategory(appEnv, Project.SCENES_CATEGORY));
- @@ -603,9 +601,9 @@
- command = MergeOffshoresCommand(scenes.ToArray(), scene_mergedfilename);
- task.AddCommand(command);
- - string errorsFileMergeForests = tempDir + "mergeForests_errors.ofsh";
- - string errorsFileMergeForestsGrounds = tempDir + "mergeForestsGrounds_errors.ofsh";
- - var outputForests = tempDir + "extruded-forests.ofsh";
- + string errorsFileMergeForests = appEnv.SurfaceTempDir + "mergeForests_errors.ofsh";
- + string errorsFileMergeForestsGrounds = appEnv.SurfaceTempDir + "mergeForestsGrounds_errors.ofsh";
- + var outputForests = appEnv.SurfaceTempDir + "extruded-forests.ofsh";
- command = new Command();
- command.EdtuCommand = "extrude-forests";
- @@ -615,8 +613,8 @@
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose() + " "
- + "-scene " + scene_mergedfilename.Enclose() + " "
- + "-weld " + weld.ToString() + " "
- - + "-grounds " + tempDir + "extrude-forests-grounds.ofsh";
- - command.ErrorsFile = tempDir + "extrude-forests-errors.ofsh";
- + + "-grounds " + appEnv.SurfaceTempDir + "extrude-forests-grounds.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "extrude-forests-errors.ofsh";
- task.AddCommand(command);
- command = new Command();
- @@ -629,7 +627,7 @@
- command = new Command();
- command.EdtuCommand = "merge-by-material";
- - command.Args = tempDir + "extrude-forests-grounds.ofsh" + " "
- + command.Args = appEnv.SurfaceTempDir + "extrude-forests-grounds.ofsh" + " "
- + outputMergedGroundsForests.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- command.ErrorsFile = errorsFileMergeForestsGrounds;
- @@ -636,7 +634,7 @@
- task.AddCommand(command);
- }
- // generate-sea
- - var outputMergedSea = tempDir + "sea-merged.ofsh";
- + var outputMergedSea = appEnv.SurfaceTempDir + "sea-merged.ofsh";
- {
- command = new Command();
- command.EdtuCommand = "generate-sea";
- @@ -645,11 +643,11 @@
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose() + " "
- + "-material Sea4.1 "
- + "-reflectreceiver " + appEnv.ReflectReceiverScene.Enclose();
- - command.ErrorsFile = tempDir + "generate-sea-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "generate-sea-errors.ofsh";
- task.AddCommand(command);
- }
- // generate-reflections
- - var outputReflectons = tempDir + "reflections-merged.ofsh";
- + var outputReflectons = appEnv.SurfaceTempDir + "reflections-merged.ofsh";
- {
- command = new Command();
- command.EdtuCommand = "generate-reflections";
- @@ -657,13 +655,13 @@
- + outputReflectons.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose() + " "
- + "-material Sea4.1";
- - command.ErrorsFile = tempDir + "generate-reflections-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "generate-reflections-errors.ofsh";
- task.AddCommand(command);
- }
- // ground
- - var outputMergedGrounds = tempDir + "grounds-merged.ofsh";
- + var outputMergedGrounds = appEnv.SurfaceTempDir + "grounds-merged.ofsh";
- {
- - var outputGrounds = tempDir + "grounds.ofsh";
- + var outputGrounds = appEnv.SurfaceTempDir + "grounds.ofsh";
- command = new Command();
- command.EdtuCommand = "fill-grounds";
- @@ -672,7 +670,7 @@
- + "-meshdata " + meshDataFilename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose() + " "
- + "-weld " + weld.ToString();
- - command.ErrorsFile = tempDir + "fill-grounds-errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "fill-grounds-errors.ofsh";
- task.AddCommand(command);
- command = new Command();
- @@ -680,7 +678,7 @@
- command.Args = outputGrounds.Enclose() + " "
- + outputMergedGrounds.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + "merge_grounds_errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + "merge_grounds_errors.ofsh";
- task.AddCommand(command);
- }
- @@ -749,8 +747,8 @@
- /////////////////////////////////////
- // L2
- - var mergedfilenameL2 = tempDir + "mergedL2.ofsh";
- - var surfacefilenameL2 = tempDir + "surfaceL2.ofsh";
- + var mergedfilenameL2 = appEnv.SurfaceTempDir + "mergedL2.ofsh";
- + var surfacefilenameL2 = appEnv.SurfaceTempDir + "surfaceL2.ofsh";
- string[] surfaceL2 = PathsFromCategory(appEnv, appEnv.Project.SurfaceLod(2));
- command = MergeOffshoresCommand(surfaceL2, mergedfilenameL2);
- task.AddCommand(command);
- @@ -771,7 +769,7 @@
- // РРєСЃРїРѕСЂС‚ sup4
- command = new Command();
- command.EdtuCommand = "export-sup4";
- - command.ErrorsFile = tempDir + @"SUP4_errors.ofsh";
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"SUP4_errors.ofsh";
- command.Args = Enclose(surfacefilenameL2) + " "
- + Enclose(appEnv.Sup4SurfaceLod) + " "
- + "-squaresize " + squareSizeL2.ToString() + " "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement