Thanks guys, I will play with it tomorrow morning.

Pymel looks nice.

Yury


On Tue, Mar 17, 2009 at 11:00 PM, 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