Skip to content

Conversation

@AurelienBesnier
Copy link
Contributor

Fixing the caribu example notebook where colors are displayed by triangles and not by shape.

"""Return a mesh from a scene"""
d = Tesselator()
indices, vertices, colors, attribute=[], [], [], []
indices, vertices, colors, attribute, col_tri = [], [], [], [], []
Copy link
Collaborator

Choose a reason for hiding this comment

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

replace col_tri by color_triangles
Col_tri may means column_tri or something else.

if d.discretization.colorList: # if a color list is defined, use it
col_list = d.discretization.colorList
for col in col_list:
hex_val = (col.red << 16) | (col.green << 8) | col.blue # get the hex code of rgb color
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be an external function?

@pradal pradal merged commit c260991 into master Dec 15, 2025
5 checks passed
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.

[Release 2025] Pgl scene with colors defined per tirangle is converted to grey mesh

3 participants