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

MAINT Deal with rgb vs rgba for different blender versions. #430

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

cchen23
Copy link
Contributor

@cchen23 cchen23 commented Feb 18, 2022

The MeshColorLoop object uses 3-dimensional rgb colors in blender 2.79, but uses 4-dimensional rgba colors in blender 3.0.1.

This PR updates add_vcolor to deal with this change: the blender version is detected, and the corresponding color format is used.

Copy link
Contributor

@TomDLT TomDLT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, the fix in #410 was incomplete, fixing only one case (not isinstance(color[0], (list, tuple))) and not checking the Blender version for backward compatiblity.

Thanks !

@cchen23 cchen23 merged commit faa1cef into main Feb 19, 2022
@cchen23 cchen23 deleted the vertex_color_compatibility branch February 19, 2022 19:53
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