Pivot & Align Tools (quad-menus)

2 votes
Version: 
1.4
Date Updated: 
12/06/2018
Author Name: 
Lorne Brooks

Pivot & Align Tools (PAT) are a set of macros bundled into a quad menu that allow you to perform various object alignment, pivot alignment and object snapping functions, among others. Most of the functions can operate on a selection of multiple objects at once.

 

A 4x4 quad version is also available.

 

The functions are as follows...

=== About ===: Displays contact and version information.

=== Options ===: Display options available for initialising the behaviour of actions (such as displaying message-boxes when picking objects)

Align Max Z: Aligns a selection to a picked object to match its maximum bounding box Z position

Align Min Z: Aligns a selection to a picked object to match its minimum bounding box Z position

Align Pivots: Aligns a selection to a picked object for position only

Align Pivots Orient: Aligns a selection to a picked object for both position and orientation

Align Vertex Snap: Enables vertex 3D snap and aligns the selection to the first picked vertex

Align Centers: Aligns a selection to a picked object's center

Align Average Centers: Aligns a selection to the average center position between two other picked objects

Ailgn Average Pivots: Aligns a selection to the average pivot position between two other picked objects

Align World: For each object in a selection, resets the alignment of both the object and it's pivot to the world, but does not actually move the pivot

Pivot Toggle: Enables/disables the pivot toggle mode

Pivot Align: Aligns the pivots of a selection to a picked object's pivot

Pivot Orient: Orients the pivots of the selection to a picked target object's pivot

Pivot Vertex Snap: Enables vertex 3D snap and aligns the selection pivots to the first picked vertex

Pivot Center: Moves the selection pivots to their object centers

Pivot Max Z: Moves the selection pivots for each object to their maximum bounding box Z position

Pivot Min Z: Moves the selection pivots for each object to their minimum bounding box Z position

Pivot Base: Moves the selection pivots to the center of each object and their minimum bounding box Z position

Pivot Origin: Moves the selection pivots to the origin

Pivot World: A selection will have their pivots aligned to the world axis

Orient Object: Aligns the orientation of a selection to that of a picked object

Orient World: A selection will be re-oriented to the world based on their pivots. If the object's orientation is offset from its pivot it will not change (unlike the Align World function)

Snap Origin: Moves the selection to the origin

Snap Origin Base: Moves the selection to the origin and their pivots to the minimum bounding box Z position

Snap Z: For each object in the selection, it moves the pivot to the minimum bounding box Z position and the object to Z=0

Snap To Surface: Snaps a selection to a picked surface in the Z axis based on ray casting

Snap To Surface Base: Snaps a selection to a picked surface in the Z axis based on ray casting and moves the pivot to the base of the selected object (min Z bounding box)

Reset Pivot: Resets the pivot of a selected object to its original position and orientation when first created. Same as the hierarchy panel version.

Reset Scale: Resets the scale transforms for selected objects. Same as reset scale in the hierarchy panel, but also works on selected hierarchies - unlike the standard version

Reset XForm: Resets the transform of a selection. Same as the Reset XForm utility, but also collapses the stack and handles negative scaling

Swap Two Objects: Two pre-selected objects have their respective positions and orientations swapped

 

There are two styles of layout for the quad menus: List (single quadrant) and 4x4 (all quadrants). Both are available under the Quads tab in Customize. You can assign hotkeys to both of them or just your preferred one.

 

Updates:

Version 1.4:

- Changed the "Pivot World" function to use ResetTransform.

- Added "Reset Pivot" function - uses the standard reset pivot found in the hierarchy panel.

- Align Average Pivots and Align Average Centers now work on CAT rigs and Biped parts as picked target objects.

 

Version 1.3;

- Removed the menuman.setShowAllQuads call as it was interfering with the "Show All Quads" interface option for LBTools - PAT Quad - 4x4. Note that this still may not work - you may need to rebuild your custom workspace from scratch to get it working (a Max interface issue).

 

Version 1.2;

- Added a new option "Pivot Max Z" which moves the pivot to the maximum bounding box Z position.

- Added a new option "Pivot World" which aligns only the pivot to the world orientation.

- Fixed some bugs with picking objects.

 

Version 1.1;

- Quad-menu items are now active when nothing is selected. Instead, selection catches have been added which display message boxes.

- Added a Reset Scale function. Same as reset scale in the hierarchy panel, but also works on hierarchies - unlike the standard version.

- Added an About panel for contact and version info.

 

Version 1.0;

- First public release.

 

 

Additional Info: 

The two quad-menus can be found under the Quads tab in Customize. Assign hotkeys to one or both of them.


Installation:

Drag the MZP file into your Max viewport. A restart will be required to initialize the quad-menus.

Files will be copied to...

C:\Users\\AppData\Local\Autodesk\3dsMax\\ENU\scripts\startup

 

 

Version Requirement: 
3dsmax 2008-2019
AttachmentSize
old_1-0_lbtools_pivotaligntools.mzp6.63 KB
old_1-1_lbtools_pivotaligntools.mzp7.65 KB
old_1-2_lbtools_pivotaligntools.mzp7.86 KB
old_1-3_lbtools_pivotaligntools.mzp7.91 KB
lbtools_pivotaligntools.mzp8.04 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mohamed_6482's picture

thank you too much

thank you too much for your great effort
i try to create a new quad and move the script to it (working good)
thank you again

lbrooks's picture

Re: have same problem quadmenu not appear (show all quads)

Hi, sorry I misunderstood the original problem.

I had a play with trying to get this working and had some success in 2016, but not 2019. It seems Max's interface doesn't always play nice with this option when assigned to a shortcut. To get it working (in 2016), I saved both my custom workspace and Custom UI Scheme after assigning the shortcut and turning on show all quads, and restarted Max.

I've removed some lines of code (in 1.3) that may have prevented the show all quads from working as expected. However, to get it working you may need to start from a fresh default workspace then install the script and try setting up a new custom UI.

Lorne Brooks

mohamed_6482's picture

have same problem quadmenu not appear (show all quads)

thaaaaaaank you too much for improvement but please can you fix quad menu issue
my problem is quadmenu (show all quads)option not working

lbrooks's picture

Re: not show as quads menu

Hi,

This should be fixed now in version 1.1. The quad items are now clickable even when nothing is selected.

Lorne Brooks

mohamed_6482's picture

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.