-
-
Save oglops/0d1e3605a2e1b43d42162eb0cd5701fe to your computer and use it in GitHub Desktop.
dim scripteditor inactive highlight selection color
This file contains 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 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