Maya Mash - repromeshShape - confusing connections results with python

24 views
Skip to first unread message

francois...@gmail.com

unread,
Nov 1, 2018, 3:18:46 PM11/1/18
to Python Programming for Autodesk Maya
Hello


I got one mash network composed with a single plane with a texture


Here is my code :


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

Here is the result :

MASH2_Repro.outMesh
MASH2_ReproMeshShape.inMesh

MASH2_Repro.meshMatrix
MASH2_Repro

MASH2_Repro.meshMessage
MASH2_ReproMeshShape.worldInverseMatrix

set7.dagSetMembers[2]
MASH2_Repro

groupId20.groupId
MASH2_ReproMeshShape.message

set7.memberWireframeColor
MASH2_Repro


3 questions :

1. Why 6 results although I got five in my node editor (see picture : https://ibb.co/evnpa0 )

2. Why MASH2_Repro is listed 3 times as a connection instead of MASH2_ReproMeshShape ?

3. What is the meaning of life ?

thanks

Fransua

Marcus Ottosson

unread,
Nov 1, 2018, 3:30:46 PM11/1/18
to python_in...@googlegroups.com

What is the meaning of life ?

42!


--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a8eae1f3-523d-4497-9c86-7d560f8d8c8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

francois...@gmail.com

unread,
Nov 1, 2018, 5:29:15 PM11/1/18
to Python Programming for Autodesk Maya
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
Reply all
Reply to author
Forward
0 new messages