Ejemplo n.º 1
0
    def getInvertRules(self):

        invertRules = []

        for loopPref in self.INVERT_RULES_PREFS:
            name = loopPref["name"]
            pref = aToolsMod.getPref(name, self.INVERT_RULES_PREFS)
            mode = name[11:]

            if pref: invertRules.append(mode)

        return invertRules
Ejemplo n.º 2
0
 def getInvertRules(self):
     
     invertRules = []
     
     for loopPref in self.INVERT_RULES_PREFS:
         name    = loopPref["name"]
         pref    = aToolsMod.getPref(name, self.INVERT_RULES_PREFS)
         mode    = name[11:]
         
         if pref: invertRules.append(mode)
 
     
     return   invertRules
Ejemplo n.º 3
0
    def popupMenu(self):
        cmds.popupMenu()
        cmds.menuItem("autoSelectMirrorObjectsMenu",
                      label='Auto Select Mirror Objects',
                      checkBox=False,
                      command=self.toggleAutoSelectMirrorObjects)
        cmds.menuItem("invertRulesMenu",
                      subMenu=True,
                      label='Invert Rules',
                      tearOff=True)
        for n, loopPref in enumerate(self.INVERT_RULES_PREFS):
            name = loopPref["name"]
            if n == 6: cmds.menuItem(divider=True)

            cmds.menuItem('%sMenu' % name,
                          label=utilMod.toTitle(name[11:]),
                          command=lambda x, name=name, *args: aToolsMod.
                          setPref(name, self.INVERT_RULES_PREFS),
                          checkBox=aToolsMod.getPref(name,
                                                     self.INVERT_RULES_PREFS))

        cmds.menuItem(divider=True)
        cmds.menuItem("loadDefaultsInvertRulesMenu",
                      label="Load Defaults",
                      command=lambda *args: utilMod.loadDefaultPrefs(
                          self.INVERT_RULES_PREFS))
        cmds.setParent('..', menu=True)
        cmds.menuItem(divider=True)
        cmds.menuItem(label="Unselect Right",
                      command=lambda *args: self.unselectMirrorObjs("right"))
        cmds.menuItem(label="Unselect Left",
                      command=lambda *args: self.unselectMirrorObjs("left"))
        cmds.menuItem(label="Unselect Center",
                      command=lambda *args: self.unselectMirrorObjs("center"))
        cmds.menuItem(divider=True)
        cmds.menuItem(
            label="Paste And Invert Cycle",
            command=lambda *args: self.applyMirror(pasteAndCycle=True))
Ejemplo n.º 4
0
 def popupMenu(self):
     cmds.popupMenu()
     cmds.menuItem("autoSelectMirrorObjectsMenu", label='Auto Select Mirror Objects' , checkBox=False, command=self.toggleAutoSelectMirrorObjects)
     cmds.menuItem("invertRulesMenu", subMenu=True, label='Invert Rules' , tearOff=True)
     for n, loopPref in enumerate(self.INVERT_RULES_PREFS):
         name    = loopPref["name"]
         if n == 6: cmds.menuItem( divider=True )
             
         cmds.menuItem('%sMenu'%name,            label=utilMod.toTitle(name[11:]),        command=lambda x, name=name, *args: aToolsMod.setPref(name, self.INVERT_RULES_PREFS), checkBox=aToolsMod.getPref(name, self.INVERT_RULES_PREFS))
     
     cmds.menuItem( divider=True )
     cmds.menuItem("loadDefaultsInvertRulesMenu",          label="Load Defaults",     command=lambda *args:utilMod.loadDefaultPrefs(self.INVERT_RULES_PREFS))
     cmds.setParent( '..', menu=True )
     cmds.menuItem( divider=True )        
     cmds.menuItem(label="Unselect Right",  command=lambda *args: self.unselectMirrorObjs("right"))
     cmds.menuItem(label="Unselect Left",   command=lambda *args: self.unselectMirrorObjs("left"))
     cmds.menuItem(label="Unselect Center", command=lambda *args: self.unselectMirrorObjs("center"))
     cmds.menuItem( divider=True )
     cmds.menuItem(label="Paste And Invert Cycle",   command=lambda *args: self.applyMirror(pasteAndCycle=True))