Little mistake 

The right code is :

name='MASH2_ReproMeshShape'
list_connectedNode_attribute = cmds.listConnections(name,p=True)
print len(list_connectedNode_attribute)
for i in range(0,len(list_connectedNode_attribute)):
        print list_connections[i]

list_connections= cmds.listConnections(name,c=True)
print len(list_connections)
for i in range(0,len(list_connections)):
        print list_connections[i]

which gives :

MASH2_ReproMeshShape
6
MASH2_ReproMeshShape.inMesh
MASH2_Repro
MASH2_ReproMeshShape.worldInverseMatrix
MASH2_Repro
MASH2_ReproMeshShape.message
MASH2_Repro

12
MASH2_ReproMeshShape.inMesh
MASH2_Repro
MASH2_ReproMeshShape.worldInverseMatrix
MASH2_Repro
MASH2_ReproMeshShape.message
MASH2_Repro
MASH2_ReproMeshShape.instObjGroups.objectGroups[0]
set7
MASH2_ReproMeshShape.instObjGroups.objectGroups[0].objectGroupId
groupId20
MASH2_ReproMeshShape.instObjGroups.objectGroups[0].objectGrpColor
set7

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/8975e8a3-ee1a-480e-9be9-c8230c373eaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to