PyWavefront
PyWavefront copied to clipboard
collect faces by material
This behavior is only active when collect_faces==True
. This flag indicates that the user is interested in playing with faces at the cost of additional memory. This change allows people to have the option to operate on faces that has a specific material. I definitely need this feature for my own project. Pushing this change in case other people may find it useful.
LGTM
Any down sides to adding this? Additional memory perhaps?
LGTM
Any down sides to adding this? Additional memory perhaps?
The only downside is additional memory for duplicating faces when this flag is active - face triangle indices will be stored in two places: Material.faces (newly added in this PR) and Mesh.faces (original code). The latter is just the combination of all Material.faces.