Pārlūkot izejas kodu

HMDOut: temp fix for mids reorder

lviguier 7 mēneši atpakaļ
vecāks
revīzija
a428ef0c01
1 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  1. 7 4
      hxd/fmt/fbx/HMDOut.hx

+ 7 - 4
hxd/fmt/fbx/HMDOut.hx

@@ -1262,10 +1262,13 @@ class HMDOut extends BaseLibrary {
 			}
 			}
 
 
 			// Reorder materials to unsure there are in the same order for lods
 			// Reorder materials to unsure there are in the same order for lods
-			midsSortRemap = new Map<Int, Int>();
-			for (idx in 0...mids.length) {
-				midsSortRemap.set(idx, mids[idx]);
-				mids[idx] = idx;
+			var lodsInfos = getLODInfos(model.name);
+			if (lodsInfos.lodLevel != -1) {
+				midsSortRemap = new Map<Int, Int>();
+				for (idx in 0...mids.length) {
+					midsSortRemap.set(idx, mids[idx]);
+					mids[idx] = idx;
+				}
 			}
 			}
 
 
 			var gdata = hgeom.get(g.getId());
 			var gdata = hgeom.get(g.getId());