예제 #1
0
def openMainWindow():
    '''
    opens main window. shelf setup with reload:

    .. code-block:: python

        from ngSkinTools.debug import reloader
        reload(reloader)
        reloader.unload()
        from ngSkinToolsTest import debugToolbarButtons
        debugToolbarButtons.openMainWindow()
    
    '''
    from ngSkinTools import log
    log.LoggerFactory = log.SimpleLoggerFactory()
    
    from ngSkinTools.context import applicationContext
    from ngSkinToolsTest.debugApplicationSetup import DebugApplicationSetup
    applicationContext.setup = DebugApplicationSetup()
    
    
    from ngSkinTools.utils import Utils
    Utils.DEBUG_MODE = True
    from ngSkinTools.ui.mainwindow import MainWindow
    MainWindow.open()
예제 #2
0
def ngskin():
    try:
        from ngSkinTools.ui.mainwindow import MainWindow
        MainWindow.open()
    except Exception, err:
        webbrowser.open("http://www.ngskintools.com/")
        raise ValueError, "Failed to load. Go get it. | {0}".format(err)
def ng_skin_tools():
    """
    Opens ngSkinTools tool if available
    First, we try to open ngSkinTools2 and if it is not available, we launch ngSkinTools1
    :return: bool
    """

    plugin_names = ['ngSkinTools2.mll', 'ngSkinTools.mll']
    for plugin_name in plugin_names:
        if not dcc.is_plugin_loaded(plugin_name):
            dcc.load_plugin(plugin_name, quiet=True)
        if dcc.is_plugin_loaded(plugin_name):
            if plugin_name == 'ngSkinTools2.mll':
                try:
                    import ngSkinTools2
                    ngSkinTools2.open_ui()
                    return True
                except Exception as exc:
                    LOGGER.warning(
                        'Impossible to launch ngSkinTool2. Trying to launch ngSkinTools1: "{}"'
                        .format(exc))
                    continue
            else:
                try:
                    from ngSkinTools.ui.mainwindow import MainWindow
                    MainWindow.open()
                    return True
                except Exception as exc:
                    'Impossible to launch ngSkinTool1: "{}"'.format(exc)
                    continue

    return False
예제 #4
0
def place():
    '''
    '''
    mel.cgmToolbox()
    MainWindow.open()
    placerMappings = data.placerMappings
    indMappings = data.independentMappings
    baseFilePath = data.baseFilePath
    meshNames = {'face':'CT_face_geo',
                 'leftEye':'LT_eyeball_geo',
                 'rightEye':'RT_eyeball_geo'}
    win = fui.newUI(baseFilePath, placerMappings, indMappings, meshNames)
예제 #5
0
 def testAddManualInfluence(self):
     openMayaFile('simplemirror.ma')
     cmds.select("testMeshY")
     mll = MllInterface()
     mll.initLayers()
     mll.setCurrentLayer(mll.createLayer("test layer"))
     
     
     window = MainWindow.open()
     mirrorTab = window.findTab(TabMirror)
     
     initWindow = mirrorTab.execInitMirror()
     
     def selectPairAndClickOk(dialog):
         log.info("running inside modal dialog "+str(dialog))
         dialog.sourceDropdown.setValue(2)
         dialog.destinationDropdown.setValue(3)
         dialog.chkSelfReference.setValue(False)
         #dialog.closeDialogWithResult(BaseDialog.BUTTON_OK)
         closeNextDialogWithResult(BaseDialog.BUTTON_OK)
         
     log.info("modal dialog setup")
     runInNextModalDialog(selectPairAndClickOk)
     log.info("modal dialog setup ended")
         
     initWindow.content.addPairAction.execute()
     
     self.assertEquals(str(initWindow.content.items[0]),"[M] L_joint2 <-> L_joint3", "manual pair addition failed")
예제 #6
0
def openMainWindow():
    '''
    opens main window. shelf setup with reload:

    .. code-block:: python

        from ngSkinTools.debug import reloader
        reload(reloader)
        reloader.unload()
        from ngSkinToolsTest import debugToolbarButtons
        debugToolbarButtons.openMainWindow()
    
    '''
    from ngSkinTools import log
    log.LoggerFactory = log.SimpleLoggerFactory()

    from ngSkinTools.context import applicationContext
    from ngSkinToolsTest.debugApplicationSetup import DebugApplicationSetup
    applicationContext.setup = DebugApplicationSetup()

    from ngSkinTools.utils import Utils
    Utils.DEBUG_MODE = True
    from ngSkinTools.ui.mainwindow import MainWindow
    MainWindow.open()
예제 #7
0
파일: gui.py 프로젝트: mkolar/Tapp
    def ngSkinTools_pushButton_released(self):

        from ngSkinTools.ui.mainwindow import MainWindow
        MainWindow.open()
예제 #8
0
def ngskin_tool():
    'ngSkinTool 실행'
    from ngSkinTools.ui.mainwindow import MainWindow
    MainWindow.open()
예제 #9
0
"""
SCRIPT NgSkinTools
AUTHOR: Isaac Buzzola/[email protected]
DATE: Friday 11 December 2020 15:53

SCRIPT FOR ZOMBIE STUDIO
"""

try:
    from maya import cmds

    from ngSkinTools.ui.mainwindow import MainWindow
    MainWindow.open()
except Exception as error:
    print(error)
예제 #10
0
 def testOpenWithInvalidOptions(self):
     MainWindow.closeAllWindows()
     cmds.optionVar(stringValue=['ngSkinToolsMirrorTab_mirrorDirection','x'])
     MainWindow.open()
예제 #11
0
 def testOpenClose(self):
     MainWindow.open()
     MainWindow.closeAllWindows()
예제 #12
0
    def ngSkinTools_pushButton_released(self):

        from ngSkinTools.ui.mainwindow import MainWindow
        MainWindow.open()