예제 #1
0
 def __init__(self, name=None, force=False):
     if name and cmds.uiTemplate(name, exists=True):
         if force:
             cmds.deleteUI(name, uiTemplate=True)
         else:
             self._name = name
             return
     args = [name] if name else []
     self._name = cmds.uiTemplate(*args)
예제 #2
0
파일: uitypes.py 프로젝트: eahneahn/pymel
 def __init__(self, name=None, force=False):
     if name and cmds.uiTemplate(name, exists=True):
         if force:
             cmds.deleteUI(name, uiTemplate=True)
         else:
             self._name = name
             return
     args = [name] if name else []
     self._name = cmds.uiTemplate(*args)
예제 #3
0
파일: uitypes.py 프로젝트: eahneahn/pymel
    def reload(cls):
        "Reload the template. Beware, this reloads the module in which the template exists!"
        nodeType = cls.nodeType()
        form = "AttrEd" + nodeType + "FormLayout"
        exists = cmds.control(form, exists=1) and cmds.formLayout(form, q=1, ca=1)

        if exists:
            sel = cmds.ls(sl=1)
            cmds.select(cl=True)
            cmds.deleteUI(form)
            if sel:
                cmds.select(sel)
        reload(sys.modules[cls.__module__])
예제 #4
0
    def reload(cls):
        "Reload the template. Beware, this reloads the module in which the template exists!"
        nodeType = cls.nodeType()
        form = "AttrEd" + nodeType + "FormLayout"
        exists = cmds.control(form, exists=1) and cmds.formLayout(form, q=1, ca=1)

        if exists:
            sel = cmds.ls(sl=1)
            cmds.select(cl=True)
            cmds.deleteUI(form)
            if sel:
                cmds.select(sel)
        reload(sys.modules[cls.__module__])
예제 #5
0
파일: uitypes.py 프로젝트: kinetifex/pymel
    def reload(cls):
        nodeType = cls.nodeType()
        form = "AttrEd" + nodeType + "FormLayout"
        exists = cmds.control(form, exists=1) and cmds.formLayout(form, q=1, ca=1)

        if exists:
            sel = cmds.ls(sl=1)
            cmds.select(cl=True)
            cmds.deleteUI(form)
        aeScript = "AE" + nodeType + "Template.mel"
        _mm.eval('source "' + aeScript + '"')

        if exists:
            cmds.select(sel)
        reload(sys.modules[cls.__module__])
예제 #6
0
파일: uitypes.py 프로젝트: eahneahn/pymel
 def clear(self):
     """ Clear all menu items from this OptionMenu """
     for t in self.getItemListLong() or []:
         cmds.deleteUI(t)
예제 #7
0
파일: uitypes.py 프로젝트: eahneahn/pymel
 def delete(self):
     cmds.deleteUI(self, window=True)
예제 #8
0
파일: uitypes.py 프로젝트: eahneahn/pymel
 def clear(self):
     children = self.getChildArray()
     if children:
         for child in self.getChildArray():
             cmds.deleteUI(child)
예제 #9
0
 def clear(self):
     """ Clear all menu items from this OptionMenu """
     for t in self.getItemListLong() or []:
         cmds.deleteUI(t)
예제 #10
0
 def delete(self):
     cmds.deleteUI(self, window=True)
예제 #11
0
 def clear(self):
     children = self.getChildArray()
     if children:
         for child in self.getChildArray():
             cmds.deleteUI(child)