[Bf-python] returnvertsfromgroup

models at paposo.com models at paposo.com
Mon Sep 29 02:03:51 CEST 2003


More thinking....
    Could getVertexInfluences() and returnVertsFromGroups() be combined?
Lets look...

getVertexInfluences()
    In:
        nVertIndex
    Out:
        [(bone name, weight),(bone name, weight),...]

(based on previous comments...)
returnVertsFromGroup()
    In:
        'group name', [nVertIndex, nVertIndex,.....]
    Out:
        [(nVertIndex, weight),(nVertIndex, weight),...]

How about this:
    In:
        [nVertIndex, nVertIndex,...], 'group name' (optional)
    Out:
        No 'group name' passed - returns all influences:
            [( nVertIndex, [('group name',  weight), ('group name',
weight)] ),...]
        else
            [(nVertIndex, weight),...]

Then maybe a function called getBoneFromGroup() somewhere - maybe in
armature where:
    In:
        'group name'
    Out:
        'bone name'

This returns PyNone when the group is not linked yet.

I guess this assumes that dVerts cannot be associated to a bone without
being also associated to a VGroup, but i think that's a good assumption...
(don't know though).








More information about the Bf-python mailing list