[Bf-python] Mesh Module
Willian Padovani Germano
wgermano at superig.com.br
Thu Oct 6 22:30:59 CEST 2005
Ken Hughes wrote:
> OK, have something ready to commit for this, but wanted feedback before
> that in case someone has better ideas:
>(...)
Seems pretty good :), congratulations again.
About vertex indices, checking Mesh.c I recalled your need for them,
indexing to get the original data from Blender's mesh verts array. I
don't have the whole picture already formed in my mind right now, but
guess it's better *not to have .index in py verts (the fat wrappers)*.
Let's see... tvert (thin), pyvert (fat):
mesh.verts[n] = tvert # ok, n is the index, we ignore tvert.index
mesh.verts[n] = pyvert # ok, pyvert has no index info, but "n" does
# returns a tvert:
tv = mesh.verts[n]
tv.co = myvector
# above is ok, it will update the correct vert in the related Blender
# mesh, since tvert has index info.
Not having .index in the pyvert also helps with faster copies like I
mentioned in my previous reply in this thread (keeping MVert and PyVert
structs very similar).
--
Willian
More information about the Bf-python
mailing list