SHOW:
|
|
- or go back to the newest paste.
| 1 | - | Index: ExportSurface.cs |
| 1 | + | Index: AppEnv.cs |
| 2 | =================================================================== | |
| 3 | - | --- ExportSurface.cs (revision 6363) |
| 3 | + | --- AppEnv.cs (revision 6363) |
| 4 | - | +++ ExportSurface.cs (working copy) |
| 4 | + | +++ AppEnv.cs (working copy) |
| 5 | @@ -235,6 +235,18 @@ | |
| 6 | set { vars["VECTORDATA5_OUTPUT_LNKD"].Value = value; }
| |
| 7 | } | |
| 8 | ||
| 9 | + public string SurfaceL0Output | |
| 10 | + {
| |
| 11 | + get { return vars["SURFACE_L0_OUTPUT"].StringValue; }
| |
| 12 | + set { vars["SURFACE_L0_OUTPUT"].Value = value; }
| |
| 13 | + } | |
| 14 | + | |
| 15 | + public string SurfaceTempDir | |
| 16 | + {
| |
| 17 | + get { return vars["SURFACE_TEMP_DIR"].StringValue; }
| |
| 18 | + set { vars["SURFACE_TEMP_DIR"].Value = value; }
| |
| 19 | + } | |
| 20 | + | |
| 21 | public string RrrSceneOutput | |
| 22 | {
| |
| 23 | get { return vars["RRR_SCENE_OUTPUT"].StringValue; }
| |
| 24 | Index: Operations/ExportNavigationMesh.cs | |
| 25 | =================================================================== | |
| 26 | --- Operations/ExportNavigationMesh.cs (revision 6363) | |
| 27 | +++ Operations/ExportNavigationMesh.cs (working copy) | |
| 28 | @@ -14,5 +14,20 @@ | |
| 29 | : base("Navigation Mesh")
| |
| 30 | {
| |
| 31 | } | |
| 32 | + | |
| 33 | + public override bool RunImp(Task task, AppEnv appEnv, bool withChildren) | |
| 34 | + {
| |
| 35 | + | |
| 36 | + Command command = new Command(); | |
| 37 | + command.Type = Command.CommandType.EDTU4; | |
| 38 | + command.EdtuCommand = "build-navigation-mesh"; | |
| 39 | + string surfaceL0filename = appEnv.SurfaceL0Output; | |
| 40 | + string navMeshfilename = appEnv.terrainConfig.TerrainCfgDir.AbsoluteByRelativeTcons() + "navigationMesh.navmesh"; | |
| 41 | + command.Args = surfaceL0filename + " " + navMeshfilename; | |
| 42 | + command.ErrorsFile = appEnv.SurfaceTempDir + @"export-vector-data_errors.ofsh"; | |
| 43 | + task.AddCommand(command); | |
| 44 | + | |
| 45 | + return true; | |
| 46 | + } | |
| 47 | } | |
| 48 | - | var cutL0filename = tempDir + "cutL0.ofsh"; |
| 48 | + | } |
| 49 | Index: Operations/ExportSurface.cs | |
| 50 | =================================================================== | |
| 51 | --- Operations/ExportSurface.cs (revision 6363) | |
| 52 | +++ Operations/ExportSurface.cs (working copy) | |
| 53 | @@ -24,7 +24,7 @@ | |
| 54 | ||
| 55 | public override bool RunImp(Task task, AppEnv appEnv, bool withChildren) | |
| 56 | {
| |
| 57 | - string tempDir = appEnv.TempDir + @"export-surface\"; | |
| 58 | + string tempDir = appEnv.SurfaceTempDir; | |
| 59 | string cutinDir = tempDir + @"rrr_and_airfields_cutin\"; | |
| 60 | string filterByPropertiesDir = tempDir + @"filter-by-properties-luas\"; | |
| 61 | string airfieldSurfaceDir = tempDir + @"airfield-surface\"; | |
| 62 | @@ -48,8 +48,6 @@ | |
| 63 | ||
| 64 | if (appEnv.terrainConfig.Lsa5) | |
| 65 | {
| |
| 66 | - tempDir = appEnv.TempDir + @"export-lsa5\"; | |
| 67 | - | |
| 68 | // apply-surface-types & merge | |
| 69 | string mergedsurface = tempDir + @"merged_surface.ofsh"; | |
| 70 | {
| |
| 71 | @@ -152,7 +150,6 @@ | |
| 72 | {
| |
| 73 | string seaMaterial = "Sea4.1"; | |
| 74 | ||
| 75 | - tempDir = appEnv.TempDir + @"export-lsa4-with-vector-data-5\"; | |
| 76 | System.IO.Directory.CreateDirectory(tempDir); | |
| 77 | Tools.Path.CleanupDir(tempDir); | |
| 78 | // apply-surface-types & merge | |
| 79 | @@ -252,7 +249,7 @@ | |
| 80 | } | |
| 81 | ||
| 82 | // build-surface-by-vector-data-5 | |
| 83 | - string surfaceL0_1 = tempDir + @"surface-L0.ofsh"; | |
| 84 | + string surfaceL0_1 = appEnv.SurfaceL0Output; | |
| 85 | string outputReflectReceiver = appEnv.ReflectReceiverScene; | |
| 86 | {
| |
| 87 | command = new Command(); | |
| 88 | @@ -562,7 +559,7 @@ | |
| 89 | command = MergeOffshoresCommand(cutbysquares.ToArray(), mergedfilename); | |
| 90 | task.AddCommand(command); | |
| 91 | ||
| 92 | - var surfaceL0filename = tempDir + "surfaceL0.ofsh"; | |
| 93 | + var surfaceL0filename = appEnv.SurfaceL0Output; | |
| 94 | var mergedL0filename = tempDir + "mergedL0.ofsh"; | |
| 95 | var finalL0filename = tempDir + "finalL0.ofsh"; | |
| 96 | var cutL0filename = tempDir + "cutL0.ofsh"; | |
| 97 | Index: Operations/TerrainConfig.cs | |
| 98 | =================================================================== | |
| 99 | --- Operations/TerrainConfig.cs (revision 6363) | |
| 100 | +++ Operations/TerrainConfig.cs (working copy) | |
| 101 | @@ -305,6 +305,8 @@ | |
| 102 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_OUTPUT"); | |
| 103 | AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT"); | |
| 104 | AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT_LNKD"); | |
| 105 | + AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_L0_OUTPUT"); | |
| 106 | + AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_TEMP_DIR"); | |
| 107 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_SCENE_OUTPUT"); | |
| 108 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_DETAILS_OUTPUT"); | |
| 109 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_POWERLINES_OUTPUT"); | |
| 110 | @@ -403,6 +405,13 @@ | |
| 111 | appEnv.ReferenceExternals = terrainCfgDir + @"SurfaceDetails\" + appEnv.TerrainName + ".external.ofsh"; | |
| 112 | appEnv.TreePreviewArchive = terrainCfgDir + @"SurfaceDetails\Trees.preview.zip"; | |
| 113 | ||
| 114 | + appEnv.SurfaceTempDir = tempDir; | |
| 115 | + if (VectorData5) | |
| 116 | + appEnv.SurfaceTempDir += @"export-lsa4-with-vector-data-5\"; | |
| 117 | + else | |
| 118 | + appEnv.SurfaceTempDir += @"export-surface\"; | |
| 119 | + appEnv.SurfaceL0Output = appEnv.SurfaceTempDir + "surface-L0.ofsh"; | |
| 120 | + | |
| 121 | System.IO.DirectoryInfo dirInfo = null; | |
| 122 | try | |
| 123 | { |