I'm using a mesh iter, and testing each face for membership in a
shading group. It seems that if ANY face of the mesh is in the
shading group, every face returns True, if it is actually assigned the
shader or not. If every face is in the shading group, every face
returns False, presumably because the mesh is the member, not
individual faces.
[CODE]
mPath = nameToDag(meshName)
sg = nameToNode(sgName)
sgSet = OpenMaya.MFnSet(sg)
iter = OpenMaya.MItMeshPolygon(mPath)
while not iter.isDone():
mFace = iter.currentItem()
index = iter.index()
faceName = (meshName+'.f['+str(index)+']')
#if cmds.sets(faceName,isMember=sgName):
if sgSet.isMember(mPath,mFace) :
print faceName,"1"
else:
print faceName,"0"
[/CODE]
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---