diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2019-09-04 16:25:52 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2019-09-04 16:25:58 +0300 |
commit | b67944cac11f0cf12113786455cf0ad78be01e25 (patch) | |
tree | a770e838d05dd1b5980cda5d22282959d5727972 /plugins/TrimeshReader | |
parent | cadbde7b92b722a2da87f6240efa0118f9126fb1 (diff) |
Fix workaround for GLTF loading
CURA-6739
Diffstat (limited to 'plugins/TrimeshReader')
-rw-r--r-- | plugins/TrimeshReader/TrimeshReader.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/TrimeshReader/TrimeshReader.py b/plugins/TrimeshReader/TrimeshReader.py index bd34df6114..7d1f182720 100644 --- a/plugins/TrimeshReader/TrimeshReader.py +++ b/plugins/TrimeshReader/TrimeshReader.py @@ -90,8 +90,7 @@ class TrimeshReader(MeshReader): # doesn't like it. For some reason, this seems to happen with 3.5.7, but not 3.7.1. Below is a workaround to # pass a file object that has been opened with "r" instead "rb" to load a GLTF file. if file_name.endswith(".gltf"): - mesh_or_scene = trimesh.load(open(file_name, "r", encoding="utf-8"), - file_type = file_name.split(".")[-1].lower()) + mesh_or_scene = trimesh.load(open(file_name, "r", encoding = "utf-8"), file_type = "gltf") else: mesh_or_scene = trimesh.load(file_name) |