Skip to content

Instantly share code, notes, and snippets.

@oiehot oiehot/maya_copyPivot.mel
Last active Feb 24, 2017

What would you like to do?
마야, 회전축 복사하기
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
You can’t perform that action at this time.