Reawakening the topic. I can grab ahold of the skinCluster by
traversing the plugs downstream and grabbing the skincluster. What I
am finding though is that in some cases I can grab a skin cluster that
may not be directly plugged into the shape (ie a blendshape with a
skinCluster) This doesn't happen if the selected object has a
skinCluster, but if it doesn't, but the blendshape does it will grab
the blendshapes skinCluster.


        itDG = openMaya.MItDependencyGraph(shape.node
(),openMaya.MItDependencyGraph.kDownstream,openMaya.MItDependencyGraph.kPlugLevel)
        while not itDG.isDone():
            oCurrentItem = itDG.currentItem()
            #the iterator returns an MObject that we then check to see
if it is a skinCluster. If it is, Save it.
            if oCurrentItem.hasFn(openMaya.MFn.kSkinClusterFilter):
                skinCluster = openAni.MFnSkinCluster(oCurrentItem)
                print (skinCluster.name() + " will be returned")
                break
            itDG.next()


I suppose it's not a deal breaker, but I would like to ensure that the
tool won't break. Does anyone know of a way to compare plugs? Maybe
see if the skinCluster that is returns is actually connecting to the
shape?

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

Reply via email to