convert_color_code.py 文件源码

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

项目:surume 作者: tm8r 项目源码 文件源码
def get_color_from_editor(self, *args):
        u"""colorEditor??????"""
        res = cmds.colorEditor()
        if "1" != res.split()[3]:
            return
        result = cmds.colorEditor(query=True, rgb=True)
        decimal_point = cmds.intFieldGrp(self.decimal_point_field, q=True, v1=True)
        r = round(result[0], decimal_point)
        g = round(result[1], decimal_point)
        b = round(result[2], decimal_point)
        bgc = self._COLOR_FORMAT.format(str(r), str(g), str(b))
        cmds.textFieldGrp(self.result_field, e=True, tx=bgc)
        cmds.text(self.color_preview, e=True, bgc=[r, g, b])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号