Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

collect faces by material #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

RoyJames
Copy link

@RoyJames RoyJames commented Nov 9, 2021

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.

@greenmoss
Copy link
Collaborator

LGTM

Any down sides to adding this? Additional memory perhaps?

@RoyJames
Copy link
Author

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.

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

Successfully merging this pull request may close these issues.

2 participants