ml_colorControl.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:ml_tools 作者: morganloomis 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号