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))
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)')
def explore(filePath): cmd = 'system ("explorer \\"" + toNativePath("' + filePath + '") + "\\"");' # print ('cmd: ' + str(cmd)) melEval(cmd)
def standardOpenScene(self, *args): self.delUi() m.evalDeferred(lambda: melEval("OpenScene"))