[Bf-python] Fixing NMesh.getVertexInfluences
Tron Thomas
tron.thomas at verizon.net
Sun Jan 15 00:00:08 CET 2006
I have two relatively recent versions of the Blender source code on
my system. When I build and run from one version, calling the
NMesh.getVertexInfluences in Python, will provide information that
can determine how vertices are influenced by bones in the mesh's
parent armature. When I build and run from the other version,
NMesh.getVertexInfluences always returns an empty list for each
vertex in the same mesh.
I checked the two versions of the function that implements that
Python method, and they are different. I don't remember making
modifications to the code in the first version. However, CVS says
that the file (NMesh.c) has been modified. So at some point in time
I must have hunted down code from another area of the source and
incorporated it in to the function.
This new code is located in the NMesh_getVertexInfluences function
found in NMesh.c that provides influences information. The code is
found inside the for loop, after the block of code that it commented
out. The following is a listing of the added code:
bDeformGroup *defgroup = BLI_findlink(&object->defbase, sweight-
>def_nr);
if( defgroup )
PyList_Append( influence_list,
Py_BuildValue( "[sf]",
defgroup->
name,
sweight->
weight ) );
Without the code listed above, the for loop essentially doesn't do
anything and always provide a empty list of vertex influences. It
seems that the code listed above or something like this is necessary
in that for loop, otherwise there is no way that the NMesh object
will be able to provide and vertex influence information.
What work has been done to fix this method?
I'm wondering if I should enter a bug against this so it gets
attention. Since the Python scripting code is still in development
and not considered ready as part of the current release, I'm not sure
if it is desired for 3rd party users like myself to be submitting
bugs on stuff that is not typically available to the general public.
More information about the Bf-python
mailing list