Hey Jo - if you're referring to the pastebin post by Chad, I think
everything is already on this thread - the api version was posted by
Simon, and Chad posted his pymel version...

- Paul

2009/8/6 Jo Jürgens <[email protected]>:
> Would it be possible to post this over again, it's expired at pasteBin
>
> Thanks
>
> On Wed, Mar 18, 2009 at 8:00 AM, Chadrik <[email protected]> wrote:
>>
>>
>> as a demo of the new pymel, i rewrote this api snippet using pymel.
>>
>> here's the full file with both the api and pymel versions:
>> http://pastebin.com/m63084e53
>>
>> as you can probably tell it's using many of the same methods as the
>> API, but wrapped up so you don't have to deal with all the extra API
>> syntax, like MScriptUtil and passing by reference.
>>
>> here's just the pymel part:
>>
>>
>> #---------------------------------------
>>
>> from pymel import *
>>
>> skin = 'skinCluster1'
>> skinClusterNode = SkinCluster(skin)
>> jointNames = skinClusterNode.influenceObjects()
>>
>> # get dagPath for the skinCluster at index 0
>>
>> index = 0
>> pathIndex = skinClusterNode.indexForOutputConnection(index)
>> skinPath = skinClusterNode.getPathAtIndex(pathIndex)
>>
>> print (jointNames)
>>
>> for geom in skinPath.verts:
>>        point = geom.getPosition('world')
>>        wts = skinClusterNode.getWeights(geom,0)
>>        for wt in wts:
>>                print wt
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to