Hello again!
I need to do vertex coloring of a mesh created with python, but
I am not sure how to do it. I found this thread:
https://blenderartists.org/forum/viewtopic.php?t=19426
But there is some missing, namely the part that creates
creates the mesh. So, can anyone show me how to create
a mesh and add vertex (painting) coloring to it? (I will be creating
500 or so meshes, and so I would like to automate all of it.)
(using 2.36)
I’ve gotten this far:
mesh = NMesh.New()
p = []
d = 16
zCo = 0
# make the vertices
p.append( NMesh.Vert( d, d, zCo ) )
p.append( NMesh.Vert( -d, d, zCo ) )
p.append( NMesh.Vert( -d, -d, zCo ) )
p.append( NMesh.Vert( d, -d, zCo ) )
# add the vertices to the mesh
for i in range( 0, 4 ):
mesh.verts.append( p[i] )
# make a face
f = NMesh.Face()
for i in range( 0, 4 ):
f.v.append( p[i] )
# add face to mesh
mesh.faces.append(f)
Thanks!
–Squirrel