Last active
February 24, 2017 07:27
-
-
Save oiehot/50102aa6ac1250de5d2b1367b2f62660 to your computer and use it in GitHub Desktop.
마야, 회전축 복사하기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global proc TZ_Transform_CopyPivot(string $src, string $dest) { | |
float $scalePivot[3]; | |
float $rotatePivot[3]; | |
$scalePivot = `xform -query -worldSpace -scalePivot $src`; | |
$rotatePivot = `xform -query -worldSpace -rotatePivot $src`; | |
xform -worldSpace -scalePivot $scalePivot[0] $scalePivot[1] $scalePivot[2] $dest; | |
xform -worldSpace -rotatePivot $rotatePivot[0] $rotatePivot[1] $rotatePivot[2] $dest; | |
} | |
global proc TZ_Transform_CopyPivot_Selection() { | |
string $node, $nodes[]; | |
$nodes = `ls -sl`; | |
int $len = size($nodes); | |
if( $len <= 1 ) return; | |
int $i; | |
string $src = $nodes[0]; | |
for($i=1; $i<$len; $i++) { | |
TZ_Transform_CopyPivot($src, $nodes[$i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment