Query Layout Panels?

137 views
Skip to first unread message

João Victor

unread,
Jul 9, 2021, 9:07:11 AM7/9/21
to Python Programming for Autodesk Maya
Hi everyone,

Maybe somebody know how I could query the active layout panels?
If its a "single" or "four" or "vertical2" and so on..

Thanks,

João

Justin Israel

unread,
Jul 12, 2021, 12:53:53 AM7/12/21
to python_in...@googlegroups.com
You can query the global main pane layout, and then query its configuration:

import maya.cmds as cmds
import maya.mel as mm

mainPane = mm.eval("$temp = $gMainPane;")
cmds.paneLayout(mainPane, query=True, numberOfVisiblePanes=True)
# 4
cmds.paneLayout(mainPane, query=True, configuration=True)
# quad


Thanks,

João

--
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/4cedf497-de9e-4f77-a7f1-c648a889bd21n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages