[Maya]Quick align in Maya

Please feel free to add your own scripts that you find useful for 3ds MAX and/or Maya!
Post Reply
Carl Buhre
Quality Assurance Manager
Posts: 433
Joined: Mon Feb 25, 2008 12:59 pm
Location: Gothenburg, Sweden
Contact:

[Maya]Quick align in Maya

Post by Carl Buhre » Tue Sep 02, 2008 9:49 am

Quick align in Maya

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];
};
You can select the script text in the Script Editor and drag it to a shelf spot to create a shortcut for it. Select MEL when prompted for MEL/Python.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest