def mayaTools_browse(*args): try: mayaToolsDir = cmds.fileDialog2(dialogStyle=2, fileMode=3)[0] # confirm that this is in fact the maya tools directory if mayaToolsDir.rpartition("/")[2] != "MayaTools": cmds.warning( "Selected directory is not the MayaTools directory. Please try again." ) else: cmds.deleteUI(objectName) # create the text file that contains the maya tools directory path path = cmds.internalVar(upd=True) + "MayaTools.txt" f = open(path, "w") f.write(mayaToolsDir) f.close() # run setup import mayaSetup mayaSetup.setupTools() except: # press cancel button pass
def SkidPlugin(): SkidToolsPath = os.path.abspath( '//Merlin/3d4/skid/09_dev/toolScripts/publish') if os.path.exists(SkidToolsPath): #run setup import mayaSetup mayaSetup.setupTools() else: print 'ERROR : SkidTools path doesnt exist. Please contact Val and bring him coffee because he will need some'
def mayaTools(): path = cmds.internalVar(upd=True) + "mayaTools.txt" if os.path.exists(path): f = open(path, "r") mayaToolsDir = f.readline() path = mayaToolsDir + "/General/Scripts" if os.path.exists(path): if not path in sys.path: sys.path.append(path) # run setup import mayaSetup mayaSetup.setupTools() else: mayaToolsInstall_UI()
def mayaTools(): # C:/Users/xxx/Documents/maya/2017/prefs/mayaTools.txt path = cmds.internalVar(upd=True) + "mayaTools.txt" if os.path.exists(path): f = open(path, "r") mayaToolsDir = f.readline() path = mayaToolsDir + "/General/Scripts" # add path if os.path.exists(path): if not path in sys.path: sys.path.append(path) # run setup import mayaSetup mayaSetup.setupTools() else: # install tool path mayaTools_UI()