Welche Art von Farbe ist eigentlich backGroundColor, die der Benutzeroberfläche Farbe hinzufügt? Ich war neugierig und habe nachgeschlagen.
Ich werde es überall anzeigen.
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)
Ausführungsergebnis
Es ist lebendig!
Recommended Posts