Maya批量传递UV插件
之前写的关于Maya批量传递UV的小插件。在传递大量模型的UV属性时可用,免得一个一个去Transfer Attribute。列表可编辑,便于多次分步进行模型选择和传递。
英文界面版: http://pan.baidu.com/s/1o7fYgsU
中文界面版:http://pan.baidu.com/s/1gdUbgJp
附源码:
//The Plug-in of batch UVs Transfer //Script by @Mullin//Date Dec, 14th, 2015string $toSendList[];clear $toSendList;string $unfoldedOBJ;$unfoldedOBJ = “”;//Function for the tip and attention windowsglobal proc wrong(int $WrongNum){ string $TextSay = “”; if($WrongNum==1) $TextSay = “Please select polygon objects.”; if($WrongNum==2) $TextSay = “Please select one polygon object.”; if($WrongNum==3) $TextSay = “You haven’t selected an unfolded object.”; if($WrongNum==4) $TextSay = “You haven’t selected object(s) to transfer UVs.”; if($WrongNum==5) $TextSay = “Don’t transfer UVs to itself.”; if($WrongNum==0) $TextSay = “Batch UVs transfer finished.”; if(`window -ex wrong`) deleteUI wrong; window -title “Tips” wrong ; rowColumnLayout -rowAttach 1 “both” 18 -columnAttach 1 “both” 50; text -label $TextSay; setParent ..; showWindow wrong; window -edit -widthHeight 350 60 -s 0 wrong;}//The command function for the UV_unfolded_OBJ button global proc loadUVunfolded(){ global string $unfoldedOBJ; string $selectList[] = `filterExpand -sm 12`; $numSelect = size ($selectList); if ($numSelect == 0){ wrong(1); $unfoldedOBJ = “”; } if ($numSelect >=2){ wrong(2); $unfoldedOBJ = “”; } if ($numSelect == 1){ $unfoldedOBJ = $selectList[0]; } textField -e -text $unfoldedOBJ loadUnfoldedOBJ;}//The command function for the plus(“+”) buttonglobal proc listAdd(){ global string $toSendList[]; string $selectList[] = `filterExpand -sm 12`; $numSelect = size ($selectList); for($i=0; $i