[Bf-python] Vertex Influence for no-armatured objs

Willian Padovani Germano wgermano at ig.com.br
Tue Sep 16 06:29:00 CEST 2003


From: <models at paposo.com>
(...)
> My point is that testing the pointers doesn't work well with the current
way
> things are set up. Any ideas?

It seems the recommended starting point for using these vgrouping methods
should start with

mesh = obj.getData()

If users create a new nmesh and want to work with vgroups, they'll need to
first make a Blender mesh out of that nmesh (with PutRaw), then get the
object and from it the obdata like above.

Object.link is another story ... we need it for compatibility for most
modules, but NMesh has its own old ways ... but its python wrapper Mesh used
object.link.

Ok, this is not as nice as we'd like the API to behave, but it is the result
of how Blender was written and how NMesh was written.  Until we 'putraw' or
update an nmesh, there is no real Blender mesh (or, if it existed, it
doesn't reflect any change made via Python).

So I'd say you've covered it in a proper way and clearly stating via the doc
how to access your new methods will do the rest.  It may not the obvious
way, in particular for Python programmers not used to NMesh, but it's still
nice and simple.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list