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

Fix missing visual copy for primitives #2305

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

clemense
Copy link
Contributor

This fixes the following problem:

import trimesh
b = trimesh.primitives.Box()
b.visual.face_colors[:] = [0, 0, 255, 255]

assert b.visual.defined == b.copy().visual.defined

This in turn affects dump and export.

I added include_visual as a parameter just to be consistent with base.py::Trimesh::copy.

@mikedh mikedh changed the base branch from main to followup/3mf October 22, 2024 00:45
@mikedh mikedh merged commit 657020e into mikedh:followup/3mf Oct 22, 2024
9 checks passed
@mikedh
Copy link
Owner

mikedh commented Oct 22, 2024

Looks good, thanks for the PR!

@clemense clemense deleted the ce/fix_primitive_visual_copy branch October 23, 2024 05:08
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