[Bf-python] verts color assign (maybe feature request)

Willian Padovani Germano wgermano at ig.com.br
Sat Jan 22 20:14:33 CET 2005


Manuel Bastioni wrote:

> Hi!
> We are working on a sub surface scattering script.
> It's usable: 15000 verts computed in about 10-12 seconds!

That's good :).

> It work with verts colors.
> So the user must press the "make vertcol" button by hand
> before use the script.

Blender uses an specific function (make_vertcol or something in 
vpaint.c) that creates vcols based on lighting, using the display list 
mesh.  That function is not bpython friendly (can pop a msg if in edit 
mode, works on the currently active mesh), but we can fulfill those 
needs transparently (leave edit mode, save selection states, select 
right mesh, call function, restore selection states) in NMesh to use it 
safely.

Issue is where, since updating an nmesh can erase this info.  Probably 
doing it as an option in nmesh.update() is the way to go: 
nmesh.update(recalc_normals = 0, store_edges = 0, shade_vcols = 0) or 
something like that.

-- 
Willian




More information about the Bf-python mailing list