LoginSignup
0
0

More than 3 years have passed since last update.

MayaのbackgroundColorの色見本

Posted at

UIに彩りを加えるbackGroundColorについて、実際どんな色になるのよ?と気になったので調べてみました。

image.png

一通り表示してみます。


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)

実行結果
image.png

鮮やかですね!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0