Distance Align Then Distribute
I would like a script that does two things with the option of doing both or each individually.
It is just like the Distribute tools for layers in Photoshop.
Example: You have a scene with a handful of objects that you want to distribute.
http://www.scriptspot.com/files/distance.png
Option 1: The script takes the selected objects and without moving/adjusting the end objects (which would be the two objects furthest from each other) the script would align them all. Think of it as if you made a straight line between the 2 end objects and then moved each object in between to match that line.
http://www.scriptspot.com/files/distancealign.png
Option 2: Would take all the objects except for the 2 end objects and then evenly distribute those objects along the virtual line that would be drawn between the 2 end objects. Which would result in all the objects being evenly space apart based on there pivot or bounding box.
http://www.scriptspot.com/files/distancedistribute.png
Thanks
JokerMartini
Attachment | Size |
---|---|
distance.png | 40.81 KB |
distancealign.png | 40.78 KB |
distancedistribute.png | 39.9 KB |
Comments
Distribute script
I have been looking for a working tool for distributing objects in space for a long time. As a result, I am developing my own.
At the moment, it can distribute not only objects, but also vertices in splines and meshes. He selects the first and last objects himself and sorts them by position in space (not by selection order). That is, everything works with one button without unnecessary windows. Highlighted - clicked the button on the panel and that's it. Or you can add keyboard shortcuts.
Download from the Github
subscribe for updates.
Distribute different objects - how I can do it???
Please explain how to use this script, evenly distribute the objects that have different sizes? The script does equal intervals between the centers of the objects. But how to make equal intervals between the objects???
nice script
nice script, but when I have objects which are not at 0,0,0 and I check "Distribute" and then "align in X", the scripts move the objects back to the x axis? the objects doesn't stay at their position (the two guide objects at the sides)?
Check out this. It works way
Check out this. It works way better.
http://jokermartini.com/2011/05/09/get-in-line/
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Great
Great work Garp. This is a very useful script you've created here.
I've noticed that when you use the option of the first and second end objects and hit the buttons that the end objects tend to move? Why is that?
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Here you go.
Here you go.
Garps
Hey Garp, Great script. I took what you wrote and threw it into a UI as well as tried to go ahead and add the option of choosing a start or end object if the user wants to.
It is a bit finiky. I figured I would post it in here and seek some help.
This is a great script.
I just added variables objA and objB for the option of a start and end obj. I'd like to add checkboxes which would allow users to choose X Y or Z
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Great
That is great Garp.
I'm going to try and make it work for all axis. X Y and Z for aligning.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
This one seems to
This one seems to work.
(could use a rollout though)
Solution
All i need to do really to make this work from here is figure out a way to find the two objects furthest away from each other and use those as the start and end objects for the function.
That is it then.
John Martini
John Martini
Digital Artist
http://www.JokerMartini.com (new site)