Skip to content

Instantly share code, notes, and snippets.

@tamask
Created April 25, 2012 04:09
Show Gist options
  • 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