Hi Chad,

You can do it easily using something like 

cmds.colorEditor()
targetWindows = ['mainWindow', 'graphEditor', etc...]
if cmds.colorEditor(q=1, result=1):  
    rgbCol = cmds.colorEditor(q=1, rgb=1)
    uis = cmds.lsUI(windows=1)
    for ui in uis:
        if any([t in ui for t in targetWindows]):
            cmds.window(ui, e=1, bgc=rgbColor)

Or if you want the qt solution, and a better control, what I usually do is 
getting a pointer to the main window and coloring it with a styleSheet, 
like so :

objName = mainWindow.objectName()
mainWindow.setStyleSheet('#'+objName+'{background-color: rgb(100, 50, 
100)}')

This way (i.e. by giving the object name of your window in the css), your 
style sheet won't be inherited by all the children !

(Funny, I don't know where you work, but I had the same request from 
animators in my studio a couple of weeks ago ^^)

Le vendredi 2 décembre 2016 17:59:19 UTC-8, Chad_Fox a écrit :
>
> Hey, just a quick follow up on this,
>
> The script I posted earlier works, but it is also changing the background 
> and text color of attribute text boxes. When an attr is keyed, locked or 
> connected while this stylesheet change is active, the backgrounds are dark 
> grey and text black. 
>
> Thoughts on why that might be?
>  
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/4e398c05-076e-4113-86d2-f6495d576d43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to