Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: AppEnv.cs
- ===================================================================
- --- AppEnv.cs (revision 6363)
- +++ AppEnv.cs (working copy)
- @@ -235,6 +235,18 @@
- set { vars["VECTORDATA5_OUTPUT_LNKD"].Value = value; }
- }
- + public string SurfaceL0Output
- + {
- + get { return vars["SURFACE_L0_OUTPUT"].StringValue; }
- + set { vars["SURFACE_L0_OUTPUT"].Value = value; }
- + }
- +
- + public string SurfaceTempDir
- + {
- + get { return vars["SURFACE_TEMP_DIR"].StringValue; }
- + set { vars["SURFACE_TEMP_DIR"].Value = value; }
- + }
- +
- public string RrrSceneOutput
- {
- get { return vars["RRR_SCENE_OUTPUT"].StringValue; }
- Index: Operations/ExportNavigationMesh.cs
- ===================================================================
- --- Operations/ExportNavigationMesh.cs (revision 6363)
- +++ Operations/ExportNavigationMesh.cs (working copy)
- @@ -14,5 +14,20 @@
- : base("Navigation Mesh")
- {
- }
- +
- + public override bool RunImp(Task task, AppEnv appEnv, bool withChildren)
- + {
- +
- + Command command = new Command();
- + command.Type = Command.CommandType.EDTU4;
- + command.EdtuCommand = "build-navigation-mesh";
- + string surfaceL0filename = appEnv.SurfaceL0Output;
- + string navMeshfilename = appEnv.terrainConfig.TerrainCfgDir.AbsoluteByRelativeTcons() + "navigationMesh.navmesh";
- + command.Args = surfaceL0filename + " " + navMeshfilename;
- + command.ErrorsFile = appEnv.SurfaceTempDir + @"export-vector-data_errors.ofsh";
- + task.AddCommand(command);
- +
- + return true;
- + }
- }
- }
- Index: Operations/ExportSurface.cs
- ===================================================================
- --- Operations/ExportSurface.cs (revision 6363)
- +++ Operations/ExportSurface.cs (working copy)
- @@ -24,7 +24,7 @@
- public override bool RunImp(Task task, AppEnv appEnv, bool withChildren)
- {
- - string tempDir = appEnv.TempDir + @"export-surface\";
- + string tempDir = appEnv.SurfaceTempDir;
- string cutinDir = tempDir + @"rrr_and_airfields_cutin\";
- string filterByPropertiesDir = tempDir + @"filter-by-properties-luas\";
- string airfieldSurfaceDir = tempDir + @"airfield-surface\";
- @@ -48,10 +48,8 @@
- if (appEnv.terrainConfig.Lsa5)
- {
- - tempDir = appEnv.TempDir + @"export-lsa5\";
- -
- // apply-surface-types & merge
- - string mergedsurface = tempDir + @"merged_surface.ofsh";
- + string mergedsurface = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_surface.ofsh";
- {
- List<string> surfaceMeshes = new List<string>();
- @@ -59,7 +57,7 @@
- foreach (var surface in surfaceL0_)
- {
- string surfaceFile = surface.FilenameNoExtension();
- - string surfaceFileRenamed = tempDir + surfaceFile + ".ofsh";
- + string surfaceFileRenamed = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + surfaceFile + ".ofsh";
- command = new Command();
- command.EdtuCommand = "apply-surface-types";
- @@ -74,7 +72,7 @@
- foreach (var airfield in airfields)
- {
- string airfieldFile = airfield.FilenameNoExtension();
- - string airfieldFileRenamed = tempDir + airfieldFile + ".ofsh";
- + string airfieldFileRenamed = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + airfieldFile + ".ofsh";
- command = new Command();
- command.EdtuCommand = "apply-surface-types";
- @@ -91,8 +89,8 @@
- // link-vector-data
- - string mergedvectordata = tempDir + @"merged_vectordata.ofsh";
- - string linkedvectordata = tempDir + @"merged_vectordata.lnkd";
- + string mergedvectordata = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_vectordata.ofsh";
- + string linkedvectordata = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_vectordata.lnkd";
- {
- string[] vectordata = PathsFromCategory(appEnv, Project.VECTOR_DATA_5_CATEGORY);
- command = MergeOffshoresCommand(vectordata, mergedvectordata);
- @@ -104,12 +102,12 @@
- + linkedvectordata.Enclose() + " "
- + "-staticmesh " + mergedsurface.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"link-vector-data_errors.ofsh"; ;
- + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"link-vector-data_errors.ofsh"; ;
- task.AddCommand(command);
- }
- // build-lsa5
- - string lsa5filename = tempDir + @"surface.lsa5";
- + string lsa5filename = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"surface.lsa5";
- {
- command = new Command();
- command.EdtuCommand = "build-lsa5";
- @@ -117,7 +115,7 @@
- + linkedvectordata.Enclose() + " "
- + lsa5filename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"build-lsa5_errors.ofsh"; ;
- + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"build-lsa5_errors.ofsh"; ;
- task.AddCommand(command);
- }
- @@ -127,9 +125,9 @@
- command.Type = Command.CommandType.EDTU4;
- command.EdtuCommand = "export-vector-data";
- command.Args = linkedvectordata.Enclose() + " "
- - + (tempDir + @"vectordata_view.ofsh").Enclose()
- + + (tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"vectordata_view.ofsh").Enclose()
- + " -terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"export-vector-data_errors.ofsh";
- + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"export-vector-data_errors.ofsh";
- task.AddCommand(command);
- }
- @@ -142,7 +140,7 @@
- command.Args = lsa5filename.Enclose() + " "
- + lsa4filename.Enclose() + " "
- + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
- - command.ErrorsFile = tempDir + @"lsa5-lsa4_errors.ofsh"; ;
- + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"lsa5-lsa4_errors.ofsh"; ;
- task.AddCommand(command);
- return true;
- @@ -152,7 +150,6 @@
- {
- string seaMaterial = "Sea4.1";
- - tempDir = appEnv.TempDir + @"export-lsa4-with-vector-data-5\";
- System.IO.Directory.CreateDirectory(tempDir);
- Tools.Path.CleanupDir(tempDir);
- // apply-surface-types & merge
- @@ -252,7 +249,7 @@
- }
- // 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();
- @@ -562,7 +559,7 @@
- command = MergeOffshoresCommand(cutbysquares.ToArray(), mergedfilename);
- task.AddCommand(command);
- - var surfaceL0filename = tempDir + "surfaceL0.ofsh";
- + var surfaceL0filename = appEnv.SurfaceL0Output;
- var mergedL0filename = tempDir + "mergedL0.ofsh";
- var finalL0filename = tempDir + "finalL0.ofsh";
- var cutL0filename = tempDir + "cutL0.ofsh";
- Index: Operations/TerrainConfig.cs
- ===================================================================
- --- Operations/TerrainConfig.cs (revision 6363)
- +++ Operations/TerrainConfig.cs (working copy)
- @@ -305,6 +305,8 @@
- AddNewFileVariableIfNotFound(appEnv.vars, "RRR_OUTPUT");
- AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT");
- AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT_LNKD");
- + AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_L0_OUTPUT");
- + AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_TEMP_DIR");
- AddNewFileVariableIfNotFound(appEnv.vars, "RRR_SCENE_OUTPUT");
- AddNewFileVariableIfNotFound(appEnv.vars, "RRR_DETAILS_OUTPUT");
- AddNewFileVariableIfNotFound(appEnv.vars, "RRR_POWERLINES_OUTPUT");
- @@ -403,6 +405,13 @@
- appEnv.ReferenceExternals = terrainCfgDir + @"SurfaceDetails\" + appEnv.TerrainName + ".external.ofsh";
- appEnv.TreePreviewArchive = terrainCfgDir + @"SurfaceDetails\Trees.preview.zip";
- + appEnv.SurfaceTempDir = tempDir;
- + if (VectorData5)
- + appEnv.SurfaceTempDir += @"export-lsa4-with-vector-data-5\";
- + else
- + appEnv.SurfaceTempDir += @"export-surface\";
- + appEnv.SurfaceL0Output = appEnv.SurfaceTempDir + "surface-L0.ofsh";
- +
- System.IO.DirectoryInfo dirInfo = null;
- try
- {
Advertisement
Add Comment
Please, Sign In to add comment