[MAYA] Aligning orientations after freezing transforms

Does anyone know of a script that helps the user align the orientations of an object after its transforms have been frozen? I would love to make something like that, but I need it sooner rather than later. Thanks!

Align the orientations to what?

It would probably take some sort of user input or manipulation to align its axis without actually rotating it. The idea being that afterwards you could zero out the translates and the rotates and it would be sitting perfectly at the origin. Perfectly aligned forward.

It’s actually possible. The problem is reduced to finding OBB (Oriented Bounding Box) of the object.
Here is a good article with white paper and code how to do it.

I worked around this before by picking three vertices on an object and using these three vertices as an axis to freeze and re-orient the object.

I used this when prop sets had been combined and frozen (think a desk with PC monitors). I wanted to make PC monitors destructible and play a shared baked animation when destroyed. All objects playing this animation had to have matching pivots

the MEL script
http://pastebin.com/aAG9D0hU

You can load vertices from one object then select all objects you wish to reset rotation on

Important is objects need to have same vertex IDs.
Instead of creating emitters and constraining camera, aim & up - cross products could been used instead? :cool:

It’s an old and dusty script

look under Maya’s Modify Menu at the Align/Snap Tools - there are a variety of options.

you can also manually rotate just the rotate pivot of a mesh.

[QUOTE=rgkovach123;29930]look under Maya’s Modify Menu at the Align/Snap Tools - there are a variety of options.

you can also manually rotate just the rotate pivot of a mesh.[/QUOTE]

Didn’t know this existed and it’s really good. It’s the command my above script should have been macroing :laugh:
Modify -> Snap align objects -> 3 points to 3 points

thanks!

Im really interested in this topic is there a way to get back the article?

I think I found the white paper