首页 > 代码库 > 刘璁_mel
刘璁_mel
nanoblock_mel();global proc nanoblock_mel(){if (`window -q -ex createNanoblockUI`)deleteUI createNanoblockUI; window -t "Nanoblock_工具" -w 200 -h 30 createNanoblockUI; rowColumnLayout -nc 1 ; rowColumnLayout -nc 7 -bgc 0 1 1; button -l "1x1" -c "importA1"; button "1x2"; button "1x3"; button "1x4"; button "1x5"; button "2x2"; button "2x3"; button "2x4"; button "1x1"; button "1x1"; setParent..; setParent..; rowColumnLayout -nc 6 -bgc 0.5 0.5 1; button -l "向左" -c "moveLeft"; button -l "向右" -c "moveRight"; button -l "向前" -c "moveFront"; button -l "向后" -c "moveBack"; button -l "向上" -c "moveUp"; button -l "向下" -c "moveDown"; button -l "左转" -c "rotationLeft" ; button -l "右转" -c "rotationRight"; setParent..; showWindow createNanoblockUI;}proc importA1(){ file -import -type "mayaBinary" -gr -ra true -rpr "A1" -options "v=0" -pr -loadReferenceDepth "all" "D:/Work/Liucong/A1.mb"; }proc moveUp(){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -t $aa`; $objY[1]+=1f; xform -ws -t $objY[0] $objY[1] $objY[2] $aa; }}proc moveDown(){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -t $aa`; $objY[1]-=1f; xform -ws -t $objY[0] $objY[1] $objY[2] $aa; }}proc moveFront (){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -t $aa`; $objY[2]+=1f; xform -ws -t $objY[0] $objY[1] $objY[2] $aa; }}proc moveBack (){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -t $aa`; $objY[2]-=1f; xform -ws -t $objY[0] $objY[1] $objY[2] $aa; }}proc moveLeft(){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -t $aa`; $objY[0]-=1f; xform -ws -t $objY[0] $objY[1] $objY[2] $aa; }}proc moveRight (){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -t $aa`; $objY[0]-=1f; xform -ws -t $objY[0] $objY[1] $objY[2] $aa; }}proc rotationLeft (){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -ro $aa`; $objY[1]-=90f; xform -ws -ro $objY[0] $objY[1] $objY[2] $aa; }}proc rotationRight (){ string $sel[]=`ls -sl`; for ($aa in $sel){ float $objY[]=`xform -q -ws -ro $aa`; $objY[1]+=90f; xform -ws -ro $objY[0] $objY[1] $objY[2] $aa; }}
刘璁_mel
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。