SHOW:
|
|
- or go back to the newest paste.
| 1 | Index: AppEnv.cs | |
| 2 | =================================================================== | |
| 3 | --- AppEnv.cs (revision 6363) | |
| 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 | } | |
| 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,10 +48,8 @@ |
| 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"; |
| 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";
|
| 70 | + | |
| 71 | @@ -152,7 +150,6 @@ | |
| 72 | - | List<string> surfaceMeshes = new List<string>(); |
| 72 | + | |
| 73 | string seaMaterial = "Sea4.1"; | |
| 74 | - | @@ -59,7 +57,7 @@ |
| 74 | + | |
| 75 | - | foreach (var surface in surfaceL0_) |
| 75 | + | |
| 76 | - | {
|
| 76 | + | |
| 77 | - | string surfaceFile = surface.FilenameNoExtension(); |
| 77 | + | |
| 78 | - | - string surfaceFileRenamed = tempDir + surfaceFile + ".ofsh"; |
| 78 | + | |
| 79 | - | + string surfaceFileRenamed = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + surfaceFile + ".ofsh";
|
| 79 | + | |
| 80 | } | |
| 81 | - | command = new Command(); |
| 81 | + | |
| 82 | - | command.EdtuCommand = "apply-surface-types"; |
| 82 | + | |
| 83 | - | @@ -74,7 +72,7 @@ |
| 83 | + | |
| 84 | - | foreach (var airfield in airfields) |
| 84 | + | |
| 85 | - | {
|
| 85 | + | |
| 86 | - | string airfieldFile = airfield.FilenameNoExtension(); |
| 86 | + | |
| 87 | - | - string airfieldFileRenamed = tempDir + airfieldFile + ".ofsh"; |
| 87 | + | |
| 88 | - | + string airfieldFileRenamed = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + airfieldFile + ".ofsh";
|
| 88 | + | |
| 89 | command = MergeOffshoresCommand(cutbysquares.ToArray(), mergedfilename); | |
| 90 | - | command = new Command(); |
| 90 | + | |
| 91 | - | command.EdtuCommand = "apply-surface-types"; |
| 91 | + | |
| 92 | - | @@ -91,8 +89,8 @@ |
| 92 | + | |
| 93 | + var surfaceL0filename = appEnv.SurfaceL0Output; | |
| 94 | var mergedL0filename = tempDir + "mergedL0.ofsh"; | |
| 95 | - | // link-vector-data |
| 95 | + | |
| 96 | - | - string mergedvectordata = tempDir + @"merged_vectordata.ofsh"; |
| 96 | + | |
| 97 | - | - string linkedvectordata = tempDir + @"merged_vectordata.lnkd"; |
| 97 | + | |
| 98 | - | + string mergedvectordata = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_vectordata.ofsh";
|
| 98 | + | |
| 99 | - | + string linkedvectordata = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"merged_vectordata.lnkd";
|
| 99 | + | |
| 100 | +++ Operations/TerrainConfig.cs (working copy) | |
| 101 | - | string[] vectordata = PathsFromCategory(appEnv, Project.VECTOR_DATA_5_CATEGORY); |
| 101 | + | |
| 102 | - | command = MergeOffshoresCommand(vectordata, mergedvectordata); |
| 102 | + | |
| 103 | - | @@ -104,12 +102,12 @@ |
| 103 | + | |
| 104 | - | + linkedvectordata.Enclose() + " " |
| 104 | + | |
| 105 | - | + "-staticmesh " + mergedsurface.Enclose() + " " |
| 105 | + | |
| 106 | - | + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose(); |
| 106 | + | |
| 107 | - | - command.ErrorsFile = tempDir + @"link-vector-data_errors.ofsh"; ; |
| 107 | + | |
| 108 | - | + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"link-vector-data_errors.ofsh"; ;
|
| 108 | + | |
| 109 | - | task.AddCommand(command); |
| 109 | + | |
| 110 | @@ -403,6 +405,14 @@ | |
| 111 | appEnv.ReferenceExternals = terrainCfgDir + @"SurfaceDetails\" + appEnv.TerrainName + ".external.ofsh"; | |
| 112 | - | // build-lsa5 |
| 112 | + | |
| 113 | - | - string lsa5filename = tempDir + @"surface.lsa5"; |
| 113 | + | |
| 114 | - | + string lsa5filename = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"surface.lsa5";
|
| 114 | + | |
| 115 | + string surfaceTempFolderName = @"export-surface\"; | |
| 116 | + if (Lsa5) | |
| 117 | - | command.EdtuCommand = "build-lsa5"; |
| 117 | + | + surfaceTempFolderName = @"export-lsa5\"; |
| 118 | - | @@ -117,7 +115,7 @@ |
| 118 | + | |
| 119 | - | + linkedvectordata.Enclose() + " " |
| 119 | + | + surfaceTempFolderName = @"export-lsa4-with-vector-data-5\"; |
| 120 | - | + lsa5filename.Enclose() + " " |
| 120 | + | + appEnv.SurfaceTempDir += surfaceTempFolderName + "surface_L0.ofsh"; |
| 121 | - | + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose(); |
| 121 | + | |
| 122 | - | - command.ErrorsFile = tempDir + @"build-lsa5_errors.ofsh"; ; |
| 122 | + | |
| 123 | - | + command.ErrorsFile = tempDir.Remove(tempDir.LastIndexOf(tempDir.Split('\\')[tempDir.Split('\\').Length - 2])) + @"export-lsa5\" + @"build-lsa5_errors.ofsh"; ;
|
| 123 | + | |
| 124 | - | task.AddCommand(command); |
| 124 | + |