Quel type de couleur est en fait backGroundColor qui ajoute de la couleur à l'interface utilisateur? J'étais curieux, alors j'ai cherché.
Je vais l'afficher partout.
import maya.cmds as cmds
import pymel.core as pm
windowtitle = 'ColorCheck'
wndwName = 'ColorCheck'
if pm.window(wndwName, ex=True):
pm.deleteUI(wndwName)
win = pm.window(wndwName, t=windowtitle, w=True )
with win:
SCL = pm.scrollLayout()
with SCL:
column = pm.columnLayout(adj=True)
with column:
for i in range(0,11):
for j in range(0,11):
RCL = pm.rowColumnLayout(numberOfColumns=22)
with RCL:
for k in range(0,11):
a = i * 0.1
b = j * 0.1
c = k * 0.1
pm.button(
l=u'%s %s %s'%(str(a), str(b), str(c)),
bgc=(a, b ,c),
c="print %s, %s, %s"%(str(a), str(b), str(c)),
w=80,
h=30,
)
pm.separator(st="none", w=5)
pm.separator(st="none", h=5)
Résultat d'exécution
C'est vif!
Recommended Posts