同步各版本工具架
bat
@echo off
set source_version=2020
set /p source_version="请输入源Maya版本号(如2020)[默认值为2020]:" || set source_version=2020
set target_versions=2018,2019,2022
set /p target_versions="请输入目标Maya版本号(如2018,2019,2022,多个版本用逗号分隔)[默认值为2018,2019,2022]:" || set target_versions=2018,2019,2022
echo.
for %%v in (%target_versions%) do (
copy /y "%USERPROFILE%\Documents\maya\%source_version%\prefs\shelves\shelf_Custom.mel" "%USERPROFILE%\Documents\maya\%%v\prefs\shelves"
copy /y "%USERPROFILE%\Documents\maya\%source_version%\prefs\shelves\shelf_bb.mel" "%USERPROFILE%\Documents\maya\%%v\prefs\shelves"
copy /y "%USERPROFILE%\Documents\maya\%source_version%\prefs\shelves\shelf_xqskin.mel" "%USERPROFILE%\Documents\maya\%%v\prefs\shelves"
)
)
echo 复制完成。
pause
切换maya中英界面
bat
@echo off
:again
cls
echo ######################请选择要执行的操作######################
echo.
echo ----------------------1、输入数字1并按回车,设置maya为英文----------------------
echo ----------------------2、输入数字2并按回车,设置maya为中文----------------------
echo ----------------------3、输入任何其它字符,关闭窗口 ----------------------
echo.
echo 请选择要执行的操作
set /p num=
@set num=%num%#
if "%num%"=="1#" (
cls
echo.
echo.
@SETX MAYA_UI_LANGUAGE en_US
pause
goto again
)
if "%num%"=="2#" (
cls
echo.
echo.
@SETX MAYA_UI_LANGUAGE zh_CN
pause
goto again
)
if "%num%"=="#" (
cls
exit
)
创建空文件夹
一键创建多层级的文件结构,用于对文件路径有要求的项目
bat
@echo off
set /p "folderPath=请输入文件夹路径:"
mkdir "%folderPath%"
start "%folderPath%"
免疫99.9999% maya 病毒
放到maya文档scripts文件夹运行,默认路径C:\Users\Administrator\Documents\maya\scripts
可以将userSetup.py文件名更改为任意想要保护被篡改的文件,Administrator为电脑用户名
bat
@echo off
set FILE1="userSetup.py"
echo. > %FILE1%
type nul >nul 2>&1
icacls %FILE1% /deny Everyone:(M)
还原文件
bat
@echo off
set FILE1="userSetup.py"
icacls %FILE1% /reset
修复软件图标
bat
taskkill /im explorer.exe /f
cd /d %userprofile%\appdata\local
del iconcache.db /a
start explorer.exe
exit
映射本地文件夹为磁盘
win+R 打开运行输入框 输入shell:common startup
放到这个启动文件夹
bat
subst I: E:\maya
映射服务器文件夹为磁盘
cmdkey /delete:192.168.90.1
cmdkey /add:192.168.90.1 /user:username /pass:password
net use /delete /y I:
net use I: \\192.168.90.1\filefolder
安装pymel
bat
@echo off
"C:\Program Files\Autodesk\Maya2020\bin\mayapy.exe" -m pip install pymel
pause
maya2022以python2方式运行
bat
@echo off
start "" "C:\Program Files\Autodesk\Maya2022\bin\maya.exe" -pythonver 2
切换网段
bat
@echo off
:again
cls
echo ######################请选择要执行的操作######################
echo.
echo ----------------------1、输入数字1并按回车,切换为40网段----------------------
echo ----------------------2、输入数字2并按回车,切换为50网段----------------------
echo ----------------------3、输入任何其它字符,关闭窗口 ----------------------
echo.
echo 请选择要执行的操作
set /p num=
@set num=%num%#
if "%num%"=="1#" (
@echo off
netsh interface ip set address name="本地连接" static 192.168.40.100 255.255.255.0 192.168.40.1
netsh interface ip set dns "本地连接" static 202.103.24.68 primary
netsh interface ip add dns "本地连接" 114.114.114.114
cls&echo 设置完成!&pause
)
if "%num%"=="2#" (
@echo off
netsh interface ip set address name="本地连接" static 192.168.50.100 255.255.255.0 192.168.50.1
netsh interface ip set dns "本地连接" static 202.103.24.68 primary
netsh interface ip add dns "本地连接" 114.114.114.114
cls&echo 设置完成!&pause
goto again
)
if "%num%"=="#" (
cls
exit
)