mikedh / trimesh

Python library for loading and using triangular meshes.

Home Page:https://trimesh.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass resolver to _read_buffers() when loading a .GLB file

dm-maxar opened this issue · comments

At about line 444 in gltf.py the resolver argument should be passed to the _read_buffers() function. That is what is currently
kwargs = _read_buffers(
header=header,
buffers=buffers,
ignore_broken=ignore_broken,
merge_primitives=merge_primitives,
skip_materials=skip_materials,
mesh_kwargs=mesh_kwargs
)
should instead read
kwargs = _read_buffers(
header=header,
buffers=buffers,
ignore_broken=ignore_broken,
merge_primitives=merge_primitives,
skip_materials=skip_materials,
mesh_kwargs=mesh_kwargs,
resolver=resolver
)

If this is not done, the texture image can not be loaded from a file where the texture URI is not base64 encoded.