Skip to content

Instantly share code, notes, and snippets.

@whoiscarlo
Last active September 17, 2015 14:15
Show Gist options
  • Save whoiscarlo/7a58908d448417d4d8d2 to your computer and use it in GitHub Desktop.
Save whoiscarlo/7a58908d448417d4d8d2 to your computer and use it in GitHub Desktop.
Change Maya Window Color
'''
Author: Greg Torrn
script: changeMayaWindowColor
'''from maya import cmds
import colorsys
import random
h = round(random.uniform(0.0, 1.0), 2)
s = round(random.uniform(0.0, 1.0), 2)
v = round(random.uniform(0.1, 0.5), 2)
rgb = colorsys.hsv_to_rgb(h, s, v)
gMainWindow = maya.mel.eval('$tmpVar=$gMainWindow')
cmds.window(gMainWindow, edit=True, backgroundColor=rgb)
sPanel = 'scriptEditorPanelWindow'
cmds.panel( 'scriptEditorPanel1', q=1, l=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment