Usage: Select the the object you wish to move, then shift-select the object you want it to get aligned to (it aligns to its pivot).
Code: Select all
{
// Author: Luigi Tramontana @ Craft Animations
// AT: Align Translations
// Usage: Select the the object you wish to move, then shift-select the object you wich it to get aligned to (it aligns to its pivot).
string $nodes[] = `ls -selection`;
float $pos[] = `xform -query -worldSpace -scalePivot $nodes[1]`;;
move -worldSpace ($pos[0]) ($pos[1]) ($pos[2]) $nodes[0];
};