Nodes/Avatar Graph/Mesh Colors Reverse
ComfyUI Node

Mesh Colors Reverse

ComfyUI Node Guide

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Colors Reverse
  • BPY_OBJ
  • BPY_OBJ

Mesh Colors Reverse is one of the smallest, most single-purpose nodes in Avatar Graph, Avatech's pack for rigging static character illustrations into real-time interactive avatars inside ComfyUI. No parameters beyond the mesh itself, and a very specific job: it reverses the order of a mesh's vertex color data.

It's a direct wrapper of Blender's bpy.ops.mesh.colors_reverse operator. Vertex colors are color values baked directly onto mesh vertices or face corners, rather than coming from a texture image - used for things like painted shading detail, masks, or gradient effects directly on the geometry. This operator flips the ordering of that color data on the mesh's active color layer, which in practice is a fix for situations where a color gradient or directional color effect ended up going the wrong way - commonly after an operation elsewhere in the pipeline mirrored the mesh, flipped its normals, or otherwise inverted its winding order without correspondingly flipping the color data to match.

The only input is the mesh itself:

  • BPY_OBJ - the object whose active vertex color layer you want reversed.

Output is the same BPY_OBJ, with its vertex colors flipped.

Honestly, this is a fix-it node more than a build-it node - you'll know you need it when a vertex-color-driven effect (a gradient, a directional mask baked into the mesh) looks backwards after some other operation ran, rather than reaching for it as a standard step in every rig. If your Avatar Graph workflow doesn't use vertex colors at all - plenty of avatar rigs are texture-driven instead - you'll likely never touch this node, and that's completely normal.

Installing it: no standalone install for a single node - you get the entire Avatar Graph pack, roughly 100 nodes, in one go. Easiest path is ComfyUI Manager, searching "Avatar Graph" or avatar-graph-comfyui. Manual install: cd ComfyUI/custom_nodes, then git clone https://github.com/avatechai/avatar-graph-comfyui, cd into it, pip install -r requirements.txt, then restart ComfyUI.

The install snag that actually causes failures: Avatar Graph requires Python 3.10.x, specifically, because its bpy dependency - Blender's Python API packaged as a standalone library - only ships wheels for that exact version. If your ComfyUI environment is running anything newer, which is the default on most current setups, the install fails rather than degrading gracefully. The README's own recommendation is a dedicated environment: conda create --name comfyui python=3.10, activate it, install ComfyUI's requirements first, then this pack's on top. If you want the live avatar preview inside Avatech's own web editor, also launch with --enable-cors-header (Mac users add --force-fp16); without that flag, mesh editing and everything else still works fine, you just export .glb/.gltf and check your work in Blender instead of getting the live in-browser preview.

Since this whole pack is explicitly labeled as under active development in its own README, don't be surprised if a niche operator like this one sees its exact behavior shift slightly between updates - it's not a heavily trafficked corner of the codebase.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ