Пример #1
0
 def load(self, filePath, fileType=None, *args):
     self.delUi()
     if not fileType:
         fileType = filePath.split(".")[-1]
         if fileType.lower() == "mb":
             fileType = "mayaBinary"
         elif fileType.lower() == "ma":
             fileType = "mayaAscii"
     melEval('openRecentFile("%s","%s")' % (filePath, fileType))
Пример #2
0
def toggleIsolate():
    '''
    singleton to toggle isolateView in current model panel
    '''
    for p in getActiveModelPanel():
        if mc.modelEditor(p, q=1, viewSelected=1):
            # if on:simply turn of works
            mc.modelEditor(p, e=1, viewSelected=0)
        else:
            # TODO: If selection is empty, you probably don't want an empty isolated view
            # if off:we need the mel proc, it collects the objs to isolate
            melEval('enableIsolateSelect("' + p + '", 1)')
Пример #3
0
def explore(filePath):
    cmd = 'system ("explorer \\"" + toNativePath("' + filePath + '") + "\\"");'
    # print ('cmd: ' + str(cmd))
    melEval(cmd)
Пример #4
0
 def standardOpenScene(self, *args):
     self.delUi()
     m.evalDeferred(lambda: melEval("OpenScene"))