would should 'connectionInfo' return the path of an object that doesn't exist ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys, I am asking on behalf of user " Luke Titley "
bug report (BSPR-32543)
I hope you are doing well. We've discovered a little inconsistency in the python api, I wondered if you would be able to help us get to the bottom of it.
I've written a python script that demonstrates the issue.
# Open your most recent version of maya.
# Open the hypershade.
# Open the script editor
# Run this script.
#
# Why do the asserts fail?
#
from maya import cmds
cmds.polyCube()
shadingGroup = cmds.listConnections("pCubeShape1.instObjGroups[0]", destination=True)
destination = shadingGroup[0] + ".dagSetMembers[0]"
source = cmds.connectionInfo(destination, sourceFromDestination=True)
print "We have in input from the hypergraph shader ball: " + source
# But all of these commands seem to suggest that the input doesn't exist
print cmds.listConnections(destination, source=True) # Should print 'shaderBallGeomShape1.instObjGroups[0]'
print cmds.objExists(source) # Should print 'True'
print cmds.ls(source) # Should print ['shaderBallGeomShape1.instObjGroups[0]']
assert cmds.listConnections(destination, source=True)
assert cmds.objExists(source)
assert cmds.ls(source)
# I underatand that the shaderball is connected to the initialShading group in order to
# render it in the hypershade.
# I don't understand why connectionInfo returns a result that is inconsistent with
# listConnections
# objExists
# ls
Appreciate any help you can provide.
All the best,