ScriptSpot

Script

Align Pivot to Direction

By miauu · 2014-10-28

Version
1.3
Version requirement
3dsMax 9 +
Date updated
2019-03-13
Votes
8
Description

 Align Pivot to DIrection(vector) allows you to align the X, Y,Z or XYZ axis of the local pivot of each of the selected objects to the direction(vector), defined by two picked in the scene points. SNAP will be turned ON automatically.  If the Shift key is down when the axis is choosen the pivot will be moved to the first picked point.

Version 1.1 should works properly with Pen(tablets).

Version 1.2 - Align To XYZ axis added. You should pick 6 points to define the three axes. Points 1 and 2 define the X axis, points 3 and 4 define the Y axis, points 5 and 6 define the Z axis

Version 1.3 - fixed bug in 3ds Max 2019.3

Videos
Attachments

Tags: align, Rotate, normal, pivot, direction, vector

Comments (30)

rachka · 2020-03-20

Working properly in 3ds Max 2020

why is this not standard max command??

thhm · 2019-05-24

Thanks so much!

Awesome!!!!

dk3dcg · 2019-04-26

Thank you so much !!

great tool!!

2019.3

wickerman123 · 2019-03-11

Hi,

I love these simple scripts but this one has gone and broke in the latest version of 3ds Max 2019.

The pivot still aligns but the preview doesn't work so it's impossible to tell what the cursor is selecting or snapping to for the alignment. (The preview still works fine in the Object to Direction script)

Can this be fixed?

.

miauu · 2019-03-11

The problem is solved. Please, test the script.

Update

wickerman123 · 2019-03-13

Dotted line still doesn't show up but the snapping preview cross appears.

Thank you so much for the quick update man!

.

miauu · 2019-03-13

It should show the dotted line now. Please, download the version _13 again and install it.

Update

wickerman123 · 2019-03-14

Perfect!

Thank you so much :)

issue confirmed

xraven · 2018-09-21

Hi miauu, thanks for the awesome script first of all.

Unfortunatly, i also often run into the issue "appius" already reported (that the geo moves slightly, when only the pivot should change). I can not confirm that applying Xform does change this.

.

miauu · 2018-09-21

If your object is scaled at subobject level then the object will moves. Applying resetXForm will sove the problem. And because of problems like this(andnot only) the golden rule is to not scale objects at subobject level.

great tool!

harumscarum · 2018-04-08

wow this is musthave tool, but it would be great to apply object pivot to all sub-objects. is it possible to implement?

.

miauu · 2018-04-09

Use the script to orient the pivot of the object.
Then, go to any suobject level, set Reference Coordiante System to PARENT and all subobjects elements will use the object's pivot.

issue

appius · 2016-10-14

thaks for the nice script.
sometime, using the script make the object rotating itself instead of rotating the pivot. I have to solve it by applying a reset xform first...

.

miauu · 2016-10-14

THis should not happen, but I can't reproduce the error.
Next time when this happen can you check if the object is scaled before to use the script?

Script not executing

Nightshade · 2015-11-18

Maya 2016 SP1
I've executed the script and assigned a keybind.
I select my mesh - a box - and click my keybind > Align Z axis
Result: My mesh becomes skewed/deformed

.

miauu · 2015-11-18

You mean Max 2016 SP1. Can you send me the object to miau_u@yahoo.com?

1rv · 2015-08-27

Similarly to the present script:
I'd select the modifier's Gizmo, then invoke script, select axis etc.
but XYZ turned to UVW.

Not not exactly but close:
http://i.imgur.com/PSpHao4.gifv
(the texture's U axis get aligned to the edge (blue one))

1rv · 2015-08-26

If only this script could work with UVW modifier's gizmo!

.

miauu · 2015-08-26

How exactly you want to use it with UVW Modifier?

1rv · 2015-08-26

miauu ,
it's awesome! thank you for your generosity and talent.

Nice script, thank you.One

mwaif · 2015-06-28

Nice script, thank you.

One suggestion though. Is it possible to add another option called "Align X,Y,Z axes" ? This will align all axes at once. When clicked this option, user will click 6 times sequentially(First 2 clicks will set X, second clicks will set Y, and then Z)
Thanks in advance.

.

miauu · 2015-06-28

Script allows you to pick only two points in the scene. Those points define a vector. How to align 3 axes to one vector?

mwaif · 2015-06-28

For example when I want to align pivot to 3 axes, I'm running the script and click "align x axis" and click two points to define x vector. Then I run the script second time for aligning for y axis and do above steps and again for z axis.

There couldn't be an easier way for this? Like running the script, first 2 clicks define x, second 2 clicks defines y, and third 2 clicks define z.

.

miauu · 2015-06-28

Try version 1.2

mwaif · 2015-06-28

working great!!!! Thank you very much!

wacom tablet issues

harumscarum · 2015-06-02

thank you - great script and very useful!
but i experience some issues with wacom tablet - need to click very carefully or many clicks to make it work
is there any option to make it working with pen input

thanks again
viktor

.

miauu · 2015-06-03

Try version 1.1.

obaida · 2015-02-24

Thank you "miauu" for making this script .
Best Regards

align pivot to edge

hanselmoniz · 2015-02-16

Please can you help me with a script that can align the x-axis pivot to the edge of a line (its a straight line with 2 points)

.

miauu · 2015-02-16

I've posted the solution here.