Skip to content

Instantly share code, notes, and snippets.

@oglops
Last active September 1, 2016 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oglops/0d1e3605a2e1b43d42162eb0cd5701fe to your computer and use it in GitHub Desktop.
Save oglops/0d1e3605a2e1b43d42162eb0cd5701fe to your computer and use it in GitHub Desktop.
dim scripteditor inactive highlight selection color
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sip
import maya.cmds as mc
import maya.OpenMayaUI as apiUI
def get_mel_global(var):
try:
return mel.eval('$tmp_var1=%s' % var)
except:
return mel.eval('$tmp_var2=%s' % var)
gCommandExecuterTabs = get_mel_global('$gCommandExecuterTabs')
tabIdx = mc.tabLayout(gCommandExecuterTabs, q=1, st=1)
cmd_executer = mc.layout(tabIdx, q=1, ca=1)[0]
ptr = apiUI.MQtUtil.findControl(cmd_executer)
textedit = sip.wrapinstance(long(ptr), QObject)
p = textedit.palette()
# restore default
# p.setColor(QPalette.Inactive, QPalette.Highlight, p.color(QPalette.Active,QPalette.Highlight))
# p.setColor(QPalette.Inactive, QPalette.HighlightedText, p.color(QPalette.Inactive,QPalette.HighlightedText))
p.setColor(QPalette.Inactive, QPalette.Highlight,QColor('#566370'))
textedit.setPalette(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment