示例#1
0
    def addCtl(self, parent, name, t, color, icon, **kwargs):

        prim = None
        if self.getName(name) in self.rig.guide.controlers.keys():
            prim = self.rig.guide.controlers[self.getName(name)]
            #Get color from rig

            try:
                rR = prim.obj.Properties('display').Parameters(12).GetValue2(
                    None)
                rG = prim.obj.Properties('display').Parameters(13).GetValue2(
                    None)
                rB = prim.obj.Properties('display').Parameters(14).GetValue2(
                    None)
                color = [rR, rG, rB]
            except:
                pass

        ctl = ico.primOrIcon(prim,
                             parent,
                             self.getName(name),
                             t,
                             color,
                             icon,
                             kwargs=kwargs)
        self.addToCtlGroup(ctl)
        return ctl
示例#2
0
文件: __init__.py 项目: immagery/air
    def addCtl(self, parent, name, t, color, icon, **kwargs):

        prim = None
        if self.getName(name) in self.rig.guide.controlers.keys():
            prim = self.rig.guide.controlers[self.getName(name)]

        ctl = ico.primOrIcon(prim, parent, self.getName(name), t, color, icon, kwargs=kwargs)
        self.addToCtlGroup(ctl)
        return ctl
示例#3
0
文件: __init__.py 项目: UIKit0/gear-1
    def addCtl(self, parent, name, t, color, icon, **kwargs):

        prim = None
        if self.getName(name) in self.rig.guide.controlers.keys():
            prim = self.rig.guide.controlers[self.getName(name)]

        ctl = ico.primOrIcon(prim, parent, self.getName(name), t, color, icon, **kwargs)
        self.addToCtlGroup(ctl)
        return ctl
示例#4
0
    def addCtl(self, parent, name, t, color, icon, **kwargs):

        prim = None
        if self.getName(name) in self.rig.guide.controlers.keys():
            prim = self.rig.guide.controlers[self.getName(name)]
            #Get color from rig
            rR = prim.obj.Properties('display').Parameters(12).GetValue2(None)
            rG = prim.obj.Properties('display').Parameters(13).GetValue2(None)
            rB = prim.obj.Properties('display').Parameters(14).GetValue2(None)
            color = [rR, rG,rB]

        ctl = ico.primOrIcon(prim, parent, self.getName(name), t, color, icon, kwargs=kwargs)
        self.addToCtlGroup(ctl)
        return ctl