Skip to content

Instantly share code, notes, and snippets.

@EricTRocks
Created May 25, 2016 14:26
Show Gist options
  • Save EricTRocks/952536070902252a31a8b96aa0652b41 to your computer and use it in GitHub Desktop.
Save EricTRocks/952536070902252a31a8b96aa0652b41 to your computer and use it in GitHub Desktop.
Get the width of the Maya main window in PyMel
import pymel.core as pm
main_window = pm.ui.Window(pm.MelGlobals.get('gMainWindow'))
width = pm.window(main_window, query=True, width=True)
print width
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment