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

Willian Padovani Germano wgermano at ig.com.br
Mon Sep 8 07:44:32 CEST 2003


From: <models at paposo.com>
(...)
> lol.  xorry im on an email frenzzy.
Feels strange, I know ... and it doesn't get better with the repetitions!
We should be on irc now : ).

Ok, another thing to consider:

The problem with NMesh was that you needed a sure way to know the object
linked to that mesh, right?  If this is the only reason, we can either:

1) Ask the user to use nmesh.update() or PutRaw() if there's no mesh or no
object linked to it yet.  That's normal behavior in NMesh, somethings just
need an update first.

But, now that we consider that this is per-object and for a same mesh can be
different for different objects, the best, instead, is to:

2) Add the object name as a required argument in the vgroup related methods.
So we'll ask the user to provide both a list of verts or a group name AND
the object where this applies to.  Not the nicest thing, but they can do it,
they will know how to keep track: to know the name of this nmeshe's object
for sure, get the nmesh from the object.data field, not with NMesh.GetRaw().
Like this:

obj = Object.Get("myobj")
nmesh = obj.getData()

#instead of directly

nmesh = NMesh.GetRaw("mymesh")
#-------------------

Using #2, do you think your methods can be put in NMesh?  Note that in any
case an nmesh.update() or NMesh.PutRaw() would be required before using
vgroup methods, of course.  Again, that's expected and needed behavior.
NMesh.PutRaw() even returns the created obj, if one had to be created.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list