Sfoglia il codice sorgente

Error message building tangents without uvs.

clementlandrin 2 anni fa
parent
commit
fe3adb8d80
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      hxd/fmt/fbx/HMDOut.hx

+ 3 - 0
hxd/fmt/fbx/HMDOut.hx

@@ -37,6 +37,9 @@ class HMDOut extends BaseLibrary {
 		var uvs = geom.getUVs();
 		var index = geom.getIndexes();
 
+		if ( index.vidx.length > 0 && uvs[0] == null )
+			throw "Need UVs to build tangents";
+
 		#if (hl && !hl_disable_mikkt && (haxe_ver >= "4.0"))
 		var m = new hl.Format.Mikktspace();
 		m.buffer = new hl.Bytes(8 * 4 * index.vidx.length);