以前に作ったホットキー割当用のMELを修正。
front←→back等の切り替えも出来るようにした。
//switchFrontView
proc toka_switchFrontView(){
float $rot;
if( "front" == (`lookThru -q`) ){
setAttr "front.tz" ((`getAttr "front.tz"`)*-1.0);
$rot = `getAttr "front.ry"`;
if( 180 <= $rot ) $rot -= 180;
else $rot += 180;
setAttr "front.ry" $rot;
}else{
lookThru front;
}
}
toka_switchFrontView();
//switchSideView
proc toka_switchSideView(){
float $rot;
if( "side" == (`lookThru -q`) ){
setAttr "side.tx" ((`getAttr "side.tx"`)*-1.0);
$rot = `getAttr "side.ry"`;
if( 90 <= $rot ) $rot -= 180;
else $rot += 180;
setAttr "side.ry" $rot;
}else{
lookThru side;
}
}
toka_switchSideView();
//switchTopView
proc toka_switchTopView(){
float $rot;
if( "top" == (`lookThru -q`) ){
setAttr "top.ty" ((`getAttr "top.ty"`)*-1.0);
$rot = `getAttr "top.rx"`;
if( 90 <= $rot ) $rot -= 180;
else $rot += 180;
setAttr "top.rx" $rot;
}else{
lookThru top;
}
}
toka_switchTopView();