CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.71k stars 307 forks source link

Normalize Windows paths correctly #150

Closed lilleyse closed 6 years ago

lilleyse commented 6 years ago

When an obj contains relative paths using windows path separators they are not normalized correctly when running obj2gltf on linux.

If the obj directory is my/obj/ and a material path in the obj is .\material.mtl the path produced by path.normalize is my/obj/.\material.mtl instead of my/obj/material.mtl. Fixed by converted converting back slashes to forward slashes manually. Maybe there is a better way?

CC @mramato

mramato commented 6 years ago

:+1: Thanks.