Browse Source

HMDOut: temp fix for mids reorder

lviguier 7 months ago
parent
commit
a428ef0c01
1 changed files with 7 additions and 4 deletions
  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
-			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());