View difference between Paste ID: RUWp59XB and KVSLjG3n
SHOW: | | - or go back to the newest paste.
1-
Index: AppEnv.cs
1+
Index: ExportSurface.cs
2
===================================================================
3-
--- AppEnv.cs	(revision 6363)
3+
--- ExportSurface.cs	(revision 6363)
4-
+++ AppEnv.cs	(working copy)
4+
+++ ExportSurface.cs	(working copy)
5-
@@ -235,6 +235,18 @@
5+
6-
             set { vars["VECTORDATA5_OUTPUT_LNKD"].Value = value; }
6+
7-
         }
7+
8
         {
9-
+        public string SurfaceL0Output
9+
10-
+        {
10+
11-
+            get { return vars["SURFACE_L0_OUTPUT"].StringValue; }
11+
12-
+            set { vars["SURFACE_L0_OUTPUT"].Value = value; }
12+
13-
+        }
13+
14-
+
14+
@@ -48,10 +48,10 @@
15-
+        public string SurfaceTempDir
15+
16-
+        {
16+
17-
+            get { return vars["SURFACE_TEMP_DIR"].StringValue; }
17+
18-
+            set { vars["SURFACE_TEMP_DIR"].Value = value; }
18+
19-
+        }
19+
+                string Lsa5TempDir = appEnv.TempDir + @"export-lsa5\";
20-
+
20+
21-
         public string RrrSceneOutput
21+
22
-                string mergedsurface = tempDir + @"merged_surface.ofsh";
23-
             get { return vars["RRR_SCENE_OUTPUT"].StringValue; }
23+
+                string mergedsurface = Lsa5TempDir + @"merged_surface.ofsh";
24-
Index: Operations/ExportNavigationMesh.cs
24+
25
                     List<string> surfaceMeshes = new List<string>();
26-
--- Operations/ExportNavigationMesh.cs	(revision 6363)
26+
27-
+++ Operations/ExportNavigationMesh.cs	(working copy)
27+
@@ -59,7 +59,7 @@
28-
@@ -14,5 +14,20 @@
28+
                     foreach (var surface in surfaceL0_)
29-
             : base("Navigation Mesh")
29+
                     {
30
                         string surfaceFile = surface.FilenameNoExtension();
31-
         }
31+
-                        string surfaceFileRenamed = tempDir + surfaceFile + ".ofsh";
32-
+
32+
+                        string surfaceFileRenamed = Lsa5TempDir + surfaceFile + ".ofsh";
33-
+        public override bool RunImp(Task task, AppEnv appEnv, bool withChildren)
33+
34-
+        {
34+
                         command = new Command();
35-
+
35+
                         command.EdtuCommand = "apply-surface-types";
36-
+            Command command = new Command();
36+
@@ -74,7 +74,7 @@
37-
+            command.Type = Command.CommandType.EDTU4;
37+
                     foreach (var airfield in airfields)
38-
+            command.EdtuCommand = "build-navigation-mesh";
38+
                     {
39-
+            string surfaceL0filename = appEnv.SurfaceL0Output;
39+
                         string airfieldFile = airfield.FilenameNoExtension();
40-
+            string navMeshfilename = appEnv.terrainConfig.TerrainCfgDir.AbsoluteByRelativeTcons() + "navigationMesh.navmesh";
40+
-                        string airfieldFileRenamed = tempDir + airfieldFile + ".ofsh";
41-
+            command.Args = surfaceL0filename + " " + navMeshfilename;
41+
+                        string airfieldFileRenamed = Lsa5TempDir + airfieldFile + ".ofsh";
42-
+            command.ErrorsFile = appEnv.SurfaceTempDir + @"export-vector-data_errors.ofsh";
42+
43-
+            task.AddCommand(command);
43+
                         command = new Command();
44-
+
44+
                         command.EdtuCommand = "apply-surface-types";
45-
+            return true;
45+
@@ -91,8 +91,8 @@
46-
+        }
46+
47-
     }
47+
48-
 }
48+
                 // link-vector-data
49-
Index: Operations/ExportSurface.cs
49+
-                string mergedvectordata = tempDir + @"merged_vectordata.ofsh";
50
-                string linkedvectordata = tempDir + @"merged_vectordata.lnkd";
51-
--- Operations/ExportSurface.cs	(revision 6363)
51+
+                string mergedvectordata = Lsa5TempDir + @"merged_vectordata.ofsh";
52-
+++ Operations/ExportSurface.cs	(working copy)
52+
+                string linkedvectordata = Lsa5TempDir + @"merged_vectordata.lnkd";
53
                 {
54
                     string[] vectordata = PathsFromCategory(appEnv, Project.VECTOR_DATA_5_CATEGORY);
55
                     command = MergeOffshoresCommand(vectordata, mergedvectordata);
56
@@ -104,12 +104,12 @@
57
                                  + linkedvectordata.Enclose() + " "
58
                                  + "-staticmesh " + mergedsurface.Enclose() + " "
59
                                  + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
60
-                    command.ErrorsFile = tempDir + @"link-vector-data_errors.ofsh"; ;
61
+                    command.ErrorsFile = Lsa5TempDir + @"link-vector-data_errors.ofsh"; ;
62-
@@ -48,8 +48,6 @@
62+
                     task.AddCommand(command);
63
                 }
64
 
65
                 // build-lsa5
66
-                string lsa5filename = tempDir + @"surface.lsa5";
67-
-
67+
+                string lsa5filename = Lsa5TempDir + @"surface.lsa5";
68
                 {
69-
                 string mergedsurface = tempDir + @"merged_surface.ofsh";
69+
70
                     command.EdtuCommand = "build-lsa5";
71-
@@ -152,7 +150,6 @@
71+
@@ -117,7 +117,7 @@
72
                                  + linkedvectordata.Enclose() + " "
73
                                  + lsa5filename.Enclose() + " "
74
                                  + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
75
-                    command.ErrorsFile = tempDir + @"build-lsa5_errors.ofsh"; ;
76
+                    command.ErrorsFile = Lsa5TempDir + @"build-lsa5_errors.ofsh"; ;
77
                     task.AddCommand(command);
78
                 }
79-
@@ -252,7 +249,7 @@
79+
80
@@ -127,9 +127,9 @@
81
                     command.Type = Command.CommandType.EDTU4;
82
                     command.EdtuCommand = "export-vector-data";
83
                     command.Args = linkedvectordata.Enclose() + " "
84
-                                   + (tempDir + @"vectordata_view.ofsh").Enclose()
85
+                                   + (Lsa5TempDir + @"vectordata_view.ofsh").Enclose()
86
                                    + " -terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
87
-                    command.ErrorsFile = tempDir + @"export-vector-data_errors.ofsh";
88-
@@ -562,7 +559,7 @@
88+
+                    command.ErrorsFile = Lsa5TempDir + @"export-vector-data_errors.ofsh";
89
                     task.AddCommand(command);
90
                 }
91
 
92
@@ -142,7 +142,7 @@
93
                 command.Args = lsa5filename.Enclose() + " "
94
                              + lsa4filename.Enclose() + " "
95
                              + "-terrain " + AppEnv.Instance.terrainConfig.TerrainCfg.Enclose();
96-
                 var cutL0filename = tempDir + "cutL0.ofsh";
96+
-                command.ErrorsFile = tempDir + @"lsa5-lsa4_errors.ofsh"; ;
97-
Index: Operations/TerrainConfig.cs
97+
+                command.ErrorsFile = Lsa5TempDir + @"lsa5-lsa4_errors.ofsh"; ;
98
                 task.AddCommand(command);
99-
--- Operations/TerrainConfig.cs	(revision 6363)
99+
100-
+++ Operations/TerrainConfig.cs	(working copy)
100+
                 return true;
101-
@@ -305,6 +305,8 @@
101+
@@ -152,7 +152,6 @@
102-
             AddNewFileVariableIfNotFound(appEnv.vars, "RRR_OUTPUT");
102+
103-
             AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT");
103+
104-
             AddNewFileVariableIfNotFound(appEnv.vars, "VECTORDATA5_OUTPUT_LNKD");
104+
105-
+            AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_L0_OUTPUT");
105+
106-
+            AddNewFileVariableIfNotFound(appEnv.vars, "SURFACE_TEMP_DIR");
106+
107-
             AddNewFileVariableIfNotFound(appEnv.vars, "RRR_SCENE_OUTPUT");
107+
108-
             AddNewFileVariableIfNotFound(appEnv.vars, "RRR_DETAILS_OUTPUT");
108+
109-
             AddNewFileVariableIfNotFound(appEnv.vars, "RRR_POWERLINES_OUTPUT");
109+
@@ -252,7 +251,7 @@
110-
@@ -403,6 +405,13 @@
110+
111-
             appEnv.ReferenceExternals = terrainCfgDir + @"SurfaceDetails\" + appEnv.TerrainName + ".external.ofsh";
111+
112-
             appEnv.TreePreviewArchive = terrainCfgDir + @"SurfaceDetails\Trees.preview.zip";
112+
113
-                string surfaceL0_1 = tempDir + @"surface-L0.ofsh";
114-
+            appEnv.SurfaceTempDir = tempDir;
114+
115-
+            if (VectorData5)
115+
116-
+                    appEnv.SurfaceTempDir += @"export-lsa4-with-vector-data-5\";
116+
117-
+            else
117+
118-
+                    appEnv.SurfaceTempDir += @"export-surface\";
118+
@@ -562,7 +561,7 @@
119-
+            appEnv.SurfaceL0Output = appEnv.SurfaceTempDir + "surface-L0.ofsh";
119+
120-
+
120+
121-
             System.IO.DirectoryInfo dirInfo = null;
121+
122-
             try
122+
123-
             {
123+
124
                 var mergedL0filename = tempDir + "mergedL0.ofsh";
125
                 var finalL0filename = tempDir + "finalL0.ofsh";
126
                 var cutL0filename = tempDir + "cutL0.ofsh";