setup.py
# *_*coding:utf-8 *_*
import maya.cmds as cmds
import maya.utils
import maya
import sys
sys.path.append(r'D:\maya_menu\scripts')
def _import():
print "the first"
def _export():
print "the second"
def _mainUI():
showMyMenuCtrl = cmds.menu(parent="MayaWindow", label = u"流程")
cmds.menuItem(parent=showMyMenuCtrl,label='Model')
cmds.menuItem(parent=showMyMenuCtrl,label='texture')
cmds.menuItem(parent=showMyMenuCtrl,label='light')
cmds.menuItem(parent=showMyMenuCtrl,label='Rigging')
cmds.menuItem(parent=showMyMenuCtrl,label='effect')
cmds.menuItem(parent=showMyMenuCtrl,label='Render')
cmds.menuItem(parent=showMyMenuCtrl,label='compent')
cmds.menuItem(parent=showMyMenuCtrl,label='Animation')
bat文件
@ECHO off
SET MAYA_ROOT=D:\LenovoC\maya2017\Maya2017
SET TOOLS_PATH=D:\maya_menu
SET PATH=%PATH%;%MAYA_ROOT%\bin
SET MAYA_PATH=D:\maya_menu
START %MAYA_ROOT%\bin\maya.exe
将他们放到D:\maya_menu的目录下,并修改maya安装路径,双击bat启动即可。