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

Willian Padovani Germano wgermano at ig.com.br
Tue Sep 16 17:28:18 CEST 2003


Hi, Joseph

Thinking a little more.  We can probably shake a little NMesh, so that it
behaves a little nicer.

The first thing to do is making NMesh_FromPyObject use the mesh pointer if
one is available, like NMesh_update does.

Another thing we can do (but sorry, this would mean you'd have once again to
change a little your additions) is add a pointer to the Blender object to
the NMesh struct, so that nmeshes acquired from:

- NMesh.New() -- NULL obj until we use update or putraw (and then the obj
pointer does get a value)
- mesh = Object.getData() -- pointer points to the right object
- NMesh.GetRaw() -- pointer points to the right object
- NMesh.PutRaw() -- here we'd have to decide, when put in another obj, if we
change the pointer to the new obj.

What do you say?

Of course, this way your methods wouldn't need the Object parameter, you'd
use the internal pointer and, when that was NULL, give an error msg telling
the user to 'putraw' the mesh first (or obj.link() it).

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list