Skip to content

Instantly share code, notes, and snippets.

@tamask
Created April 25, 2012 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamask/2486251 to your computer and use it in GitHub Desktop.
Save tamask/2486251 to your computer and use it in GitHub Desktop.
vertex color adjustment (bmesh)
def paint(mesh, fn):
c = mesh.vertex_colors.active.data
for p in mesh.polygons:
if p.select:
for i in p.loop_indices:
c[i].color = fn(c[i].color)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment