Skip to content

Commit 26bfb18

Browse files
committed
md5 first test ok
1 parent fb0a33d commit 26bfb18

File tree

9 files changed

+1109
-185
lines changed

9 files changed

+1109
-185
lines changed

src/main/kotlin/assimp/ImporterRegistry.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import assimp.format.assbin.AssbinLoader
55
import assimp.format.collada.ColladaLoader
66
import assimp.format.md2.MD2Importer
77
import assimp.format.md3.MD3Importer
8+
import assimp.format.md5.MD5Importer
89
import assimp.format.obj.ObjFileImporter
910
import assimp.format.ply.PlyLoader
1011
import assimp.format.stl.STLImporter
@@ -33,6 +34,7 @@ val importerInstanceList
3334
if (!ASSBIN_IMPORTER) add(AssbinLoader())
3435
if (!MD2_IMPORTER) add(MD2Importer())
3536
if (!MD3_IMPORTER) add(MD3Importer())
37+
if (!MD5_IMPORTER) add(MD5Importer())
3638
if (!X_IMPORTER) add(XFileImporter())
3739
}
3840
}

src/main/kotlin/assimp/defs.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ infix operator fun File.plus(another: String) = File(this, another)
4444

4545
fun URL.exists() = Files.exists(Paths.get(toURI()))
4646
fun URI.exists() = Files.exists(Paths.get(this))
47-
val URI.extension get() = path.substringAfterLast('.', "").toLowerCase()
47+
val URI.extension
48+
get() =
49+
if (path.contains(".")) path.substringAfterLast('.', "").toLowerCase()
50+
else ""
4851
val URI.s get() = toString()
4952

5053
fun Element.elementChildren(): ArrayList<Element> {

src/main/kotlin/assimp/format/md3/Md3Loader.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ object Q3Shader {
111111
val blocks = ArrayList<ShaderDataBlock>()
112112
}
113113

114-
private val String.words get() = split(Regex("\\s+"))
115114
/** @brief Load a shader file
116115
*
117116
* Generally, parsing is error tolerant. There's no failure.

0 commit comments

Comments
 (0)