下载地址:http://u.163.com/t73yjF22 提取码: RT5nzANu
看到购买aboutcg发布的AboutCG_Yeti For Maya 影视特效毛发完全教学的学者们抱怨Yeti&arnold安装不成功,出各种问题,作者就下载了安装玩两把,
不好安装的主要原因是设置环境变量之多,作者于是就尝试了用脚本制作一个一键安装小程序。
复制下面代码到txt文本,保存为.bat格式即可,作者使用的是对应的maya2015版本,不同版本只需稍作修改。
版本一(指定路径安装):
@echo off
set YetiPath=D:\Yeti
set ArnoldPath=D:\solidangle\mtoadeploy\2015
setlocal ENABLEDELAYEDEXPANSION
for /f "tokens=1,2,3* delims= " %%a in (%YetiPath%\pgYetiMaya.mod) do (
set var=%%d
set var=!var:%%d=%YetiPath%!
cd.>%YetiPath%\pgYetiMaya.mod
echo %%a %%b %%c !var!>>%YetiPath%\pgYetiMaya.mod
)
echo 1.modify pgYetiMaya.mod success!
echo;
setx MAYA_MODULE_PATH %YetiPath% /M >nul
echo 2.create MAYA_MODULE_PATH success!
echo;
setx PEREGRINEL_LICENSE %YetiPath%\rlm\peregrinel.lic /M >nul
echo 3.create PEREGRINEL_LICENSE success!
echo;
setx PYTHONPATH %ArnoldPath%\scripts /M >nul
echo 4.create PYTHONPATH success!
echo;
cd.>Maya.env
echo MAYA_MODULE_PATH = %ArnoldPath%;>>Maya.env
echo ARNOLD_PLUGIN_PATH = %ArnoldPath%\shaders;>>Maya.env
echo MTOA_EXTENSIONS_PATH = %ArnoldPath%\extensions;%YetiPath%\plug-ins;>>Maya.env
echo MAYA_RENDER_DESC_PATH = %ArnoldPath%;>>Maya.env
echo PATH = %ArnoldPath%\bin;%YetiPath%\bin;>>Maya.env
echo MAYA_PLUG_IN_PATH = %ArnoldPath%\plug-ins;>>Maya.env
echo 5.add to Maya.env success!
echo;
pause
版本二(纯一键式安装)
@echo off
set YetiPath=%cd%\Yeti
set ArnoldPath=%cd%\solidangle\mtoadeploy\2015
wmic ENVIRONMENT where "name='MAYA_MODULE_PATH'" delete >nul
wmic ENVIRONMENT create name="MAYA_MODULE_PATH",username="<system>",VariableValue="%YetiPath%" >nul
echo 1.create MAYA_MODULE_PATH success!
echo;
%~d0
cd %~dp0Yeti
cd.>pgYetiMaya.mod
echo + pgYetiMaya 1.3.12 %YetiPath%>>pgYetiMaya.mod
echo 2.modify pgYetiMaya.mod success!
echo;
wmic ENVIRONMENT where "name='PEREGRINEL_LICENSE'" delete >nul
wmic ENVIRONMENT create name="PEREGRINEL_LICENSE",username="<system>",VariableValue="%YetiPath%\rlm\peregrinel.lic" >nul
echo 3.create PEREGRINEL_LICENSE success!
echo;
wmic ENVIRONMENT where "name='PYTHONPATH'" delete >nul
wmic ENVIRONMENT create name="PYTHONPATH",username="<system>",VariableValue="%ArnoldPath%\scripts" >nul
echo 4.create PYTHONPATH success!
echo;
cd.>%HOMEDRIVE%%HOMEPATH%\Documents\maya\2015-x64\Maya.env
echo MAYA_MODULE_PATH = %ArnoldPath%;>>%HOMEDRIVE%%HOMEPATH%\Documents\maya\2015-x64\Maya.env
echo ARNOLD_PLUGIN_PATH = %ArnoldPath%\shaders;>>%HOMEDRIVE%%HOMEPATH%\Documents\maya\2015-x64\Maya.env
echo MTOA_EXTENSIONS_PATH = %ArnoldPath%\extensions;%YetiPath%\plug-ins;>>%HOMEDRIVE%%HOMEPATH%\Documents\maya\2015-x64\Maya.env
echo MAYA_RENDER_DESC_PATH = %ArnoldPath%;>>%HOMEDRIVE%%HOMEPATH%\Documents\maya\2015-x64\Maya.env
echo PATH = %ArnoldPath%\bin;%YetiPath%\bin;>>%HOMEDRIVE%%HOMEPATH%\Documents\maya\2015-x64\Maya.env
echo MAYA_PLUG_IN_PATH = %ArnoldPath%\plug-ins;>>%HOMEDRIVE%%HOMEPATH%\Documents\maya\2015-x64\Maya.env
echo 5.add to Maya.env success!
echo;
pause
作者再次测试一遍: