Closed hananbeer closed 4 years ago
It needs to be documented, but searching in the issues here you can find : https://github.com/pywavefront/PyWavefront/issues/87#issuecomment-464348971
I continued playing with this object a bit more and I observed the following: (edited original comment)
I'm not too familiar with the format, but this seems incorrect: obj.meshes[None].materials[0].vertices
gives an UNORDERED list of normals, not vertices, definitely not obj.vertices (which produces correct results)
edit: ah, I see in the issue you posted, material[].vertices provides ALL information, including UV, normals, etc... kinda unclear imo. thanks.
ok got it :)
Yep. You just have to look at the format string. The attributes are always in the same order, so its simple to check what attributes are present with a couple of "N3F" in format
.
Closing and duping this with #103
I couldn't find how to access 'normals' in the doc. looking at the code it seems they are parsed but not exposed;
eventually I managed to access it by 'obj.parser.normals' but it isn't trivial. also I'm not sure about the format, shouldn't they be per mesh/material, and not global?
edit: I'm not too familiar with the format, but this seems incorrect: obj.meshes[None].materials[0].vertices
gives an UNORDERED list of normals, not vertices, definitely not obj.vertices (which produces correct results)