This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import maya.mel as mel | |
| mel_globals = mel.eval("env") | |
| for mel_global in mel_globals: | |
| print mel_global |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import shiboken2 | |
| from PySide2 import QtWidgets | |
| import maya.cmds as cmds | |
| import maya.mel as mel | |
| import maya.OpenMayaUI as omui | |
| # Get the MEL global value for the status line element. The status line is what holds the | |
| # buttons at the top of Maya that has the mode dropdown (modeling, animation, rigging, etc), | |
| # selection type toggle buttons, render buttons, etc... | |
| name = mel.eval('string $tempStr = $gStatusLine') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from shiboken2 import wrapInstance | |
| from PySide2 import QtCore, QtWidgets | |
| import maya.cmds as cmds | |
| from maya import OpenMayaUI | |
| from maya.app.general.mayaMixin import MayaQWidgetDockableMixin | |
| def get_maya_win(): | |
| win_ptr = OpenMayaUI.MQtUtil.mainWindow() | |
| return wrapInstance(long(win_ptr), QtWidgets.QMainWindow) |