cmdx: cmdx.listRelatives always returns None
Steps to reproduce:
- Create cube primitive.
- run `import cmdx import maya.cmds as cmds
print cmdx.listRelatives(“pCube1”) print cmds.listRelatives(“pCube1”)`
cmds.listRelatives returns [u’pCubeShape1’] while cmdx.listRelatives(“pCube1”) returns None
Example from the command reference also returns false and not true.
cmdx 0.4.6 Maya 2020.2 Windows 10
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 18 (18 by maintainers)
That was interesting, I manage to figure out that this is what’s causing it to fail.
This is what we use to
access["attributes"]
. I tried finding a way around it, but there doesn’t seem to be one? 🤔With that in mind, it would be safe to expand on
__repr__
to return more info.Hm, I remember going back and forth on this. It’s possible that if you pass a
cmdx.DagNode
to amaya.cmds
command, that Maya would treat it as a string viarepr
. It’s worth a shot though, the tests should cover any backwards compatibility issues. You can try this locally already, and run the tests locally. If those pass, I see no reason why not. Nobody would be surprised byrepr
returning too much information I think.