pombreda / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

myShape.inMesh.inputs() gives a Transform node (not a shape node) #222

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
saw this when I had an ncloth object hooked up to the input of a mesh; if you 
do plugs=True, we get the correct node/attribute

Original issue reported on code.google.com by elron...@gmail.com on 17 Dec 2010 at 1:32

GoogleCodeExporter commented 9 years ago
it seems this is just a 'feature' of cmds.listConnections...

import maya.cmds as cmds

cmds.file(new=1, f=1)
cube1, cubeMaker = cmds.polyCube()

...returns ['pCube1']

Going to just let sleeping dogs lie - most people who want something accurate / 
useful will probably be using plugs=True anyway...
mesh = cmds.createNode('mesh')
cmds.connectAttr(cube1 + '.outMesh', mesh + '.inMesh')

print cmds.listConnections('polySurfaceShape1.inMesh', source=True, 
destination=False)

Original comment by elron...@gmail.com on 25 Jan 2011 at 5:50