Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AttributeError raised when loading glTF with mesh primitives that aren't type 4 / triangles #808

Open
artgillespie opened this issue Jul 17, 2024 · 1 comment

Comments

@artgillespie
Copy link

In io/gltf.py:293 skip_mesh is left as True when encountering a mesh primitive that isn't type 4/triangles.

As a result, at io/gltf.py:338 None is appended to meshes.

At io/gltf.py:375 the returned meshes list is enumerated and has_attribute is called on each item without checking whether it's None, leading to an AttributeError exception raised to the caller.

How best to handle this is really a design question for the library maintainers, but I think clients should either get a sensible exception explaining that the glTF has unsupported primitive modes, or be given the opportunity to handle None meshes.

@shumash
Copy link
Collaborator

shumash commented Jul 19, 2024

Thank you for your note. To help us address this, would you be able to share a sample gltf file that causes this issue?

(this can be private for internal testing purposes only)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants