def colorControlLayout(self, label=''):
mc.rowLayout( numberOfColumns=4,
columnWidth4=(150, 200, 90, 80),
adjustableColumn=2,
columnAlign=(1, 'right'),
columnAttach=[(1, 'both', 0),
(2, 'both', 0),
(3, 'both', 0),
(4, 'both', 0)] )
mc.text(label=label)
colorSlider = mc.colorSliderGrp( label='', adj=2, columnWidth=((1,1),(3,1)))
mc.button(label='From Selected',
ann='Get the color of the selected object.',
command=partial(self.setFromSelected, colorSlider))
mc.button(label='Randomize',
ann='Set a random color.',
command=partial(self.randomizeColors, colorSlider))
controls = mc.layout(colorSlider, query=True, childArray=True)
mc.setParent('..')
return colorSlider
评论列表
文章目录