mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-21 15:29:32 +08:00
vertex colors
This commit is contained in:
parent
faeb47b3c8
commit
391eacf9f0
@ -852,8 +852,8 @@ class PostProcessMesh(IO.ComfyNode):
|
||||
|
||||
# Safely grab colors if they exist
|
||||
c_i = None
|
||||
if hasattr(mesh, 'colors') and mesh.colors is not None:
|
||||
c_i = mesh.colors[i] if (isinstance(mesh.colors, list) or mesh.colors.ndim == 3) else mesh.colors
|
||||
if hasattr(mesh, 'vertex_colors') and mesh.vertex_colors is not None:
|
||||
c_i = mesh.vertex_colors[i] if (isinstance(mesh.vertex_colors, list) or mesh.vertex_colors.ndim == 3) else mesh.vertex_colors
|
||||
|
||||
v_i, f_i, c_i = process_single(v_i, f_i, c_i, bar)
|
||||
|
||||
@ -877,7 +877,7 @@ class PostProcessMesh(IO.ComfyNode):
|
||||
|
||||
else:
|
||||
# Single Unbatched Mesh[V, 3]
|
||||
c = mesh.colors if hasattr(mesh, 'colors') and mesh.colors is not None else None
|
||||
c = mesh.vertex_colors if hasattr(mesh, 'vertex_colors') and mesh.vertex_colors is not None else None
|
||||
v, f, c = process_single(mesh.vertices, mesh.faces, c)
|
||||
mesh.vertices = v
|
||||
mesh.faces = f
|
||||
|
||||
Loading…
Reference in New Issue
Block a user