Hi Guys,
I am trying to get the parent layouts of the time control, but am getting an error and I am unsure why.
import pymel.core as pm
defaultTimeControl = pm.lsUI(type ='timeControl')[0]
print defaultTimeControl
print type(defaultTimeControl)
listTimeParents = pm.listRelatives(defaultTimeControl, allParents = True)
yields this information;
MayaWindow|toolBar6|MainTimeSliderLayout|formLayout9|frameLayout2|timeControl1
<class 'pymel.core.uitypes.PyUI'>
but gives the following error;
# Error:
# Traceback (most recent call last):
# File "<maya console>", line 6, in <module>
# File "C:\Program Files\Autodesk\Maya2013\Python\Lib\site-packages\pymel\core\general.py", line 892, in listRelatives
# results = map(PyNode, _util.listForNone(cmds.listRelatives(*args, **kwargs)))
# File "C:\Program Files\Autodesk\Maya2013\Python\Lib\site-packages\pymel\internal\pmcmds.py", line 140, in wrappedCmd
# raise pymel.core.general._objectError(obj)
# MayaNodeError: Maya Node does not exist: u'MayaWindow|toolBar6|MainTimeSliderLayout|formLayout9|frameLayout2|timeControl1' #
Can anyone explain why this is please? Sorry for a noobish question
Thanks, Chris