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 | - | @@ -48,10 +48,10 @@ |
| 14 | + | + |
| 15 | + public string SurfaceTempDir | |
| 16 | + {
| |
| 17 | + get { return vars["SURFACE_TEMP_DIR"].StringValue; }
| |
| 18 | + set { vars["SURFACE_TEMP_DIR"].Value = value; }
| |
| 19 | - | + string Lsa5TempDir = appEnv.TempDir + @"export-lsa5\"; |
| 19 | + | + } |
| 20 | + | |
| 21 | public string RrrSceneOutput | |
| 22 | {
| |
| 23 | - | + string mergedsurface = Lsa5TempDir + @"merged_surface.ofsh"; |
| 23 | + | get { return vars["RRR_SCENE_OUTPUT"].StringValue; }
|
| 24 | Index: Operations/ExportNavigationMesh.cs | |
| 25 | =================================================================== | |
| 26 | --- Operations/ExportNavigationMesh.cs (revision 6363) | |
| 27 | - | @@ -59,7 +59,7 @@ |
| 27 | + | +++ Operations/ExportNavigationMesh.cs (working copy) |
| 28 | @@ -14,5 +14,20 @@ | |
| 29 | : base("Navigation Mesh")
| |
| 30 | {
| |
| 31 | } | |
| 32 | - | + string surfaceFileRenamed = Lsa5TempDir + surfaceFile + ".ofsh"; |
| 32 | + | + |
| 33 | + public override bool RunImp(Task task, AppEnv appEnv, bool withChildren) | |
| 34 | + {
| |
| 35 | + | |
| 36 | - | @@ -74,7 +74,7 @@ |
| 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 | - | + string airfieldFileRenamed = Lsa5TempDir + airfieldFile + ".ofsh"; |
| 41 | + | + command.Args = surfaceL0filename + " " + navMeshfilename; |
| 42 | + command.ErrorsFile = appEnv.SurfaceTempDir + @"export-vector-data_errors.ofsh"; | |
| 43 | + task.AddCommand(command); | |
| 44 | + | |
| 45 | - | @@ -91,8 +91,8 @@ |
| 45 | + | + return true; |
| 46 | + } | |
| 47 | } | |
| 48 | } | |
| 49 | Index: Operations/ExportSurface.cs | |
| 50 | =================================================================== | |
| 51 | - | + string mergedvectordata = Lsa5TempDir + @"merged_vectordata.ofsh"; |
| 51 | + | --- Operations/ExportSurface.cs (revision 6363) |
| 52 | - | + string linkedvectordata = Lsa5TempDir + @"merged_vectordata.lnkd"; |
| 52 | + | +++ Operations/ExportSurface.cs (working copy) |
| 53 | @@ -24,7 +24,7 @@ | |
| 54 | ||
| 55 | public override bool RunImp(Task task, AppEnv appEnv, bool withChildren) | |
| 56 | - | @@ -104,12 +104,12 @@ |
| 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 | - | + command.ErrorsFile = Lsa5TempDir + @"link-vector-data_errors.ofsh"; ; |
| 61 | + | |
| 62 | @@ -48,10 +48,8 @@ | |
| 63 | ||
| 64 | if (appEnv.terrainConfig.Lsa5) | |
| 65 | {
| |
| 66 | - tempDir = appEnv.TempDir + @"export-lsa5\"; | |
| 67 | - | + string lsa5filename = Lsa5TempDir + @"surface.lsa5"; |
| 67 | + | - |
| 68 | // apply-surface-types & merge | |
| 69 | - string mergedsurface = tempDir + @"merged_surface.ofsh"; | |
| 70 | + string mergedsurface = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_surface.ofsh";
| |
| 71 | - | @@ -117,7 +117,7 @@ |
| 71 | + | |
| 72 | List<string> surfaceMeshes = new List<string>(); | |
| 73 | ||
| 74 | @@ -59,7 +57,7 @@ | |
| 75 | foreach (var surface in surfaceL0_) | |
| 76 | - | + command.ErrorsFile = Lsa5TempDir + @"build-lsa5_errors.ofsh"; ; |
| 76 | + | |
| 77 | string surfaceFile = surface.FilenameNoExtension(); | |
| 78 | - string surfaceFileRenamed = tempDir + surfaceFile + ".ofsh"; | |
| 79 | + string surfaceFileRenamed = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + surfaceFile + ".ofsh";
| |
| 80 | - | @@ -127,9 +127,9 @@ |
| 80 | + | |
| 81 | command = new Command(); | |
| 82 | command.EdtuCommand = "apply-surface-types"; | |
| 83 | @@ -74,7 +72,7 @@ | |
| 84 | foreach (var airfield in airfields) | |
| 85 | - | + + (Lsa5TempDir + @"vectordata_view.ofsh").Enclose() |
| 85 | + | |
| 86 | string airfieldFile = airfield.FilenameNoExtension(); | |
| 87 | - string airfieldFileRenamed = tempDir + airfieldFile + ".ofsh"; | |
| 88 | - | + command.ErrorsFile = Lsa5TempDir + @"export-vector-data_errors.ofsh"; |
| 88 | + | + string airfieldFileRenamed = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + airfieldFile + ".ofsh";
|
| 89 | ||
| 90 | command = new Command(); | |
| 91 | command.EdtuCommand = "apply-surface-types"; | |
| 92 | - | @@ -142,7 +142,7 @@ |
| 92 | + | @@ -91,8 +89,8 @@ |
| 93 | ||
| 94 | ||
| 95 | // link-vector-data | |
| 96 | - string mergedvectordata = tempDir + @"merged_vectordata.ofsh"; | |
| 97 | - | + command.ErrorsFile = Lsa5TempDir + @"lsa5-lsa4_errors.ofsh"; ; |
| 97 | + | |
| 98 | + string mergedvectordata = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_vectordata.ofsh";
| |
| 99 | + string linkedvectordata = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_vectordata.lnkd";
| |
| 100 | {
| |
| 101 | - | @@ -152,7 +152,6 @@ |
| 101 | + | |
| 102 | command = MergeOffshoresCommand(vectordata, mergedvectordata); | |
| 103 | @@ -104,12 +102,12 @@ | |
| 104 | + linkedvectordata.Enclose() + " " | |
| 105 | + "-staticmesh " + mergedsurface.Enclose() + " " | |
| 106 | + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose(); | |
| 107 | - command.ErrorsFile = tempDir + @"link-vector-data_errors.ofsh"; ; | |
| 108 | + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"link-vector-data_errors.ofsh"; ;
| |
| 109 | - | @@ -252,7 +251,7 @@ |
| 109 | + | |
| 110 | } | |
| 111 | ||
| 112 | // build-lsa5 | |
| 113 | - string lsa5filename = tempDir + @"surface.lsa5"; | |
| 114 | + string lsa5filename = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"surface.lsa5";
| |
| 115 | {
| |
| 116 | command = new Command(); | |
| 117 | command.EdtuCommand = "build-lsa5"; | |
| 118 | - | @@ -562,7 +561,7 @@ |
| 118 | + | @@ -117,7 +115,7 @@ |
| 119 | + linkedvectordata.Enclose() + " " | |
| 120 | + lsa5filename.Enclose() + " " | |
| 121 | + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose(); | |
| 122 | - command.ErrorsFile = tempDir + @"build-lsa5_errors.ofsh"; ; | |
| 123 | + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"build-lsa5_errors.ofsh"; ;
| |
| 124 | task.AddCommand(command); | |
| 125 | } | |
| 126 | - | var cutL0filename = tempDir + "cutL0.ofsh"; |
| 126 | + | |
| 127 | @@ -127,9 +125,9 @@ | |
| 128 | command.Type = Command.CommandType.EDTU4; | |
| 129 | command.EdtuCommand = "export-vector-data"; | |
| 130 | command.Args = linkedvectordata.Enclose() + " " | |
| 131 | - + (tempDir + @"vectordata_view.ofsh").Enclose() | |
| 132 | + + (tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"vectordata_view.ofsh").Enclose()
| |
| 133 | + " -terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose(); | |
| 134 | - command.ErrorsFile = tempDir + @"export-vector-data_errors.ofsh"; | |
| 135 | + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"export-vector-data_errors.ofsh";
| |
| 136 | task.AddCommand(command); | |
| 137 | } | |
| 138 | ||
| 139 | @@ -142,7 +140,7 @@ | |
| 140 | command.Args = lsa5filename.Enclose() + " " | |
| 141 | + lsa4filename.Enclose() + " " | |
| 142 | + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose(); | |
| 143 | - command.ErrorsFile = tempDir + @"lsa5-lsa4_errors.ofsh"; ; | |
| 144 | + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"lsa5-lsa4_errors.ofsh"; ;
| |
| 145 | task.AddCommand(command); | |
| 146 | ||
| 147 | return true; | |
| 148 | @@ -152,7 +150,6 @@ | |
| 149 | {
| |
| 150 | string seaMaterial = "Sea4.1"; | |
| 151 | ||
| 152 | - tempDir = appEnv.TempDir + @"export-lsa4-with-vector-data-5\"; | |
| 153 | System.IO.Directory.CreateDirectory(tempDir); | |
| 154 | Tools.Path.CleanupDir(tempDir); | |
| 155 | // apply-surface-types & merge | |
| 156 | @@ -252,7 +249,7 @@ | |
| 157 | } | |
| 158 | ||
| 159 | // build-surface-by-vector-data-5 | |
| 160 | - string surfaceL0_1 = tempDir + @"surface-L0.ofsh"; | |
| 161 | + string surfaceL0_1 = appEnv.SurfaceL0Output; | |
| 162 | string outputReflectReceiver = appEnv.ReflectReceiverScene; | |
| 163 | {
| |
| 164 | command = new Command(); | |
| 165 | @@ -562,7 +559,7 @@ | |
| 166 | command = MergeOffshoresCommand(cutbysquares.ToArray(), mergedfilename); | |
| 167 | task.AddCommand(command); | |
| 168 | ||
| 169 | - var surfaceL0filename = tempDir + "surfaceL0.ofsh"; | |
| 170 | + var surfaceL0filename = appEnv.SurfaceL0Output; | |
| 171 | var mergedL0filename = tempDir + "mergedL0.ofsh"; | |
| 172 | var finalL0filename = tempDir + "finalL0.ofsh"; | |
| 173 | var cutL0filename = tempDir + "cutL0.ofsh"; | |
| 174 | Index: Operations/TerrainConfig.cs | |
| 175 | =================================================================== | |
| 176 | --- Operations/TerrainConfig.cs (revision 6363) | |
| 177 | +++ Operations/TerrainConfig.cs (working copy) | |
| 178 | @@ -305,6 +305,8 @@ | |
| 179 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_OUTPUT"); | |
| 180 | AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT"); | |
| 181 | AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT_LNKD"); | |
| 182 | + AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_L0_OUTPUT"); | |
| 183 | + AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_TEMP_DIR"); | |
| 184 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_SCENE_OUTPUT"); | |
| 185 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_DETAILS_OUTPUT"); | |
| 186 | AddNewFileVariableIfNotFound(appEnv.vars, "RRR_POWERLINES_OUTPUT"); | |
| 187 | @@ -403,6 +405,13 @@ | |
| 188 | appEnv.ReferenceExternals = terrainCfgDir + @"SurfaceDetails\" + appEnv.TerrainName + ".external.ofsh"; | |
| 189 | appEnv.TreePreviewArchive = terrainCfgDir + @"SurfaceDetails\Trees.preview.zip"; | |
| 190 | ||
| 191 | + appEnv.SurfaceTempDir = tempDir; | |
| 192 | + if (VectorData5) | |
| 193 | + appEnv.SurfaceTempDir += @"export-lsa4-with-vector-data-5\"; | |
| 194 | + else | |
| 195 | + appEnv.SurfaceTempDir += @"export-surface\"; | |
| 196 | + appEnv.SurfaceL0Output = appEnv.SurfaceTempDir + "surface-L0.ofsh"; | |
| 197 | + | |
| 198 | System.IO.DirectoryInfo dirInfo = null; | |
| 199 | try | |
| 200 | { |