// Creation Date: // // Author: // // ------------------------- // --------------------------- // Klaus Stangl // Student@TU Graz // Demoartist/Developer // Educator@Siliconstudio Graz // www.worldofmaya.com // office@worldofmaya.com // ----------------------------- // ------------------------------- // // Script Name: copyTransform.mel // // // // Description: // // string $selection[]; $selection = `ls -sl`; $selectionSize = `size($selection)`; int $run_VarX; for ($run_VarX = 0; $run_VarX < $selectionSize-1; $run_VarX++) { setAttr ($selection[$run_VarX]+".translateX") (`getAttr ($selection[$selectionSize-1]+".translateX")`); setAttr ($selection[$run_VarX]+".translateY") (`getAttr ($selection[$selectionSize-1]+".translateY")`); setAttr ($selection[$run_VarX]+".translateZ") (`getAttr ($selection[$selectionSize-1]+".translateZ")`); setAttr ($selection[$run_VarX]+".rotateX") (`getAttr ($selection[$selectionSize-1]+".rotateX")`); setAttr ($selection[$run_VarX]+".rotateY") (`getAttr ($selection[$selectionSize-1]+".rotateY")`); setAttr ($selection[$run_VarX]+".rotateZ") (`getAttr ($selection[$selectionSize-1]+".rotateZ")`); setAttr ($selection[$run_VarX]+".scaleX") (`getAttr ($selection[$selectionSize-1]+".scaleX")`); setAttr ($selection[$run_VarX]+".scaleY") (`getAttr ($selection[$selectionSize-1]+".scaleY")`); setAttr ($selection[$run_VarX]+".scaleZ") (`getAttr ($selection[$selectionSize-1]+".scaleZ")`); }