maxscript align tools.

While I was in Utrecht, Ken Pimental was asked what features we think should be added to Max. Someone asked for the ability to align an object to three points.

This script has been in my toolbox for a long time, so I’ve taken it out, polished it up, and partnered it with a friend. There are probably other scripts out there that will do this for you but I hope you will find mine intuitive and easy to use.

Ladies and gentlemen I give to you Align Tools

Download here

image icon for the algin to three points tool. 1. Align to three points

Pick your source objects, activate the tool and then click the three points. Max refuses to show the snap icon after the first click but it will snap correctly.

image icon for the algin to edge tool. 2. Align to an edge

Pick your target object, select and edge in the sub-object and the click the tool. Now either click your source object or right click to have a dummy created along that edge.

Installation:

Download the mzp package and drop it into your max viewport.

customize | customize user interface

choose the JNScripts category and the two tools should be listed. Drag them onto a toolbar. You may need to re-start Max in order to get the icons to show correctly.

If I can think of any more then I will expand the toolbox. Requests welcomed.

14 Comments

  1. mohinder
    Posted 23 July, 2009 at 9:32 pm | Permalink

    Could you explain how to install the script onc eI have downloaded the zip file? Thanks.

  2. Posted 23 July, 2009 at 9:44 pm | Permalink

    Hi Mohinder,

    The zip file is a special mzp file design especially for 3ds Max. you can either:

    1 – drag the file and drop it onto your viewport
    2 – chose ‘run’from the Maxscript dropdown list

    Once this done, you then choose ‘customize | customize user interface’ from the drop down menus.

    Then you will find a field called ‘catergoy’, change this to ‘JN Scripts’.

    You will then see two tools listed called ‘Align to edge’ and ‘Align to three points’.

    With your mouse, drag these onto your toolbar one by one to create buttons for the tools.

    You may need to re-start Max in order to get the icons to show correctly.

    I hope this helps!

  3. Cristian
    Posted 5 August, 2009 at 5:18 pm | Permalink

    First of all, thanks for sharing :)
    What I would like to see in max (max 9 and up) is a simple toolbar à la Illustrator or Photoshop, with a more simple behaviour (there’s an obvious difference between 2D and 3D tools, but I think it can be useful with a little tweaking to the options/behaviours):

    - If you have 2 or more objects selected, the tools became active.

    - Options (buttons):
    – Align Objects
    – Align Min / Horizontal Align center / Horizontal Max
    – Distribute objects
    – Distribute Min / Distribute center / Distribute Max
    – Distribute Spacing:
    – distribute space
    – Axis (X/Y/Z) used for align/distribute (one of them must be selected, so it can default to X).

    - Pressing the buttons align or distribute the objects accordingly. No more clicks needed.

    The logic is: instead of vertical/horizontal (2D), X/Y/Z axis (3D); instead of left/center/right (2D), min/center/max (3D). Min and Max options follows the same logic as some other tools in 3dsmax (minimum and maximum values in a given axis instead of left/right or top/bottom).

    If you can come up with something like that (well, and if you’re willing to), that would be supercool!

    Hope it would ignite some good scripting ideas ;)

  4. Posted 5 August, 2009 at 5:33 pm | Permalink

    Hi Cristian,

    A good thought! I think Neil Blevins has a quick align tool as part of his soulburn scripts that may do some of what you’re asking. Check out his web page or on scriptspot. http://scriptspot.com/3ds-max/aligner
    I do have a spacing tool somewhere around here that needs a little dusting but I will get it out and see if I can make it something useful

    Josh.

  5. Cristian
    Posted 5 August, 2009 at 5:49 pm | Permalink

    Hey! that was quick! ;)
    Thanks for your kind response :)
    About Neil’s tools (an awesome lot) I think that there’s still too much “thinking” and clicking. Adobe’s tools are simple and economic: the buttons perform the task at the moment of being pressed. The only pre-requisite is having 2 or more objects selected. No extra clicking (ok, in illustrator actually there’s a different behaviour than photoshop’s: you can do an extra click to specify to wich object the others will be aligned… but that’s a special case; the general and more simple use is just a click away).

    Cristian.

  6. Posted 5 August, 2009 at 5:55 pm | Permalink

    ok, it’s a good idea so I’ll look into it!

  7. belly
    Posted 16 October, 2009 at 6:33 pm | Permalink

    Hi Josh,

    I think I have a very good idea who this “someone” in Utrecht was who requested the three point align tool :-)

    Many thanks!

    see you again at the EUE in 2011?

    cheers mate

    belly

  8. Posted 17 October, 2009 at 2:07 pm | Permalink

    Hi Belly!

    It is fast becoming popular. I’ll be in Utrecht again next year so hopefully I will see you there!

    J.

  9. belly
    Posted 28 November, 2009 at 1:19 pm | Permalink

    Hi Josh,

    Last week, I tried to install your align tools with max design 2010 and win 7 pro 64 bit. It seems it is not installing them. Could it be that this is due to win 7?

    cheers

    belly

  10. Posted 28 November, 2009 at 1:45 pm | Permalink

    Hi belly,

    I use w7 on my laptop and it installs fine. What happens when you drop the mzp? does it open a report window?

    It’s no secret what is happening under the hood with installation. In the mazp (basically a zip file) there are bmp files and mcr files. The files are copied to these directories

    *.bmp to $ui\Icons
    *.mcr to $macroscripts

    These locations should be the current ui folder and the current macroscript folders. You can look in there yourself and see if they’re copied. This location by default is under your user directory, for example:

    C:\Users\$MY USERNAME\AppData\Local\Autodesk\3dsMaxDesign\2010 – 32bit\enu\UI\usermacros

    Let me know how it goes

    Josh.

  11. belly
    Posted 9 December, 2009 at 3:41 pm | Permalink

    Hi Josh,

    after dropping the mpz file in MAX window, nothing happened and I didn’t receive any error message.
    I looked into the specific usermacroscript folder and it was empty.

    So I unpacked the MPZ and copied everything to the correct folders.
    Now it is working.

    cheers

    belly

  12. Posted 9 December, 2009 at 3:54 pm | Permalink

    Good job!

    Still, strange it should work. Did you try running it from the scirpt drop-down menu?

    J.

  13. belly
    Posted 13 December, 2009 at 8:29 pm | Permalink

    Didn’t tried it.

    anyway, thanks

    belly

  14. wj
    Posted 1 February, 2010 at 1:34 am | Permalink

    very good

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*