ScriptSpot home

Get In Line! (May 9,2011)

Downloads

3ds Max compatibility
Unknown
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
5.0
Author’s update date
Legacy votes
61
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

JokerMartini

More by this author

Description

This script evenly distributes the selected objects based on the start and end target objects.

Anyone is more than welcome to add to this.
Things you could potentially add are qsorting, transform, scale, and rotation sorting as well.

Right now it just does position.

Comments (37)

Comment policy

Carlos rodriguez

Distribute Xref Objects

Hi could it be possible to order Xref Objects
I cannot get it work with those kind

Evgeniy Pankov

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.

Attachments
crystal3d

the version i have definitely spoils the grouped objects...

can it be adjusted so that it treats groupd objects as single items so they get in line properly?

Reply to crystal3d
crystal3d

my work around atm

is to open those groups and select on the group entity so the objects inside the group dont get spoiled

Reply to crystal3d
crystal3d

but that would be much more practical

if i did not have to check for groups as i use this script for practicality purposes... merge vegetation from a scene, get them inline and check the shadings each next to each other in one go for comparsion between

tracymurphy

The UX interviews really stood out to us. We received a lot of internal information UX design firm that we could learn from,The team is organized, efficient, and prompt to accommodate feedback.

trueman

Hi. Thanks for the cool script.
I suggest it would be nice to add start/end objects existence check. Sometimes I accidentally try to distribute objects between deleted objects that leads to runtime error.

Reply to trueman
Branko Živković

@trueman
Just change state_ok function in line 6.
Here is the fix

fn state_ok = if selection.count == 0 then return off else
(
for obj in selection where isValidNode obj do
(
if (obj.name == StartObj.name or obj.name == EndObj.name) do return off
) ; on
)

JokerMartini

This is getting a re-write at the moment and will be much quicker with easier control and use.

Spacelord

Thank you

This is so cool, I was just thinking it would be great to have a Revit feature that is very similar to this script in 3dsmax and here it is !!

Thanks a million.

Sergio

sorry
I do not understand how this script works
You can make video?

JokerMartini

Sorry about the bug. I'll look into fixing that and implement it into the update.

I never test on groups as they, to me, are bad practice to use inside of 3ds Max. I only say that because man handles them incorrectly. That is no fault of you or I, but just wanted to make mention of it.

As far as fixing that though, I'll be sure to do so. Thank you for the report.

Florian Dubiel

not working with groups

nice script, but it is not working with groups, it opens groups and distribute all objects. It should keep groups closed and distribute only the group node/container. That would be awesome :)

cheers

dub

asymptote

Very useful, the only things I could suggest to improve are realtime preview and ability to remember which objects are selected (selection sets?)

thx for the script.

crystal3d

very good and

and it shuffles the order of the objects... maybe it could consider the objects' name on distribution order like 12345 and not like 154362.

thanks you

JokerMartini

You could space out the objects based on their bounding box and then space them accordingly.
It is definitely something worth integrating into the next release of this script.

wobi

Thanks

Nice one man, thank you for this.

su37

Can you help me the script where is wrong ?

obj = for i in selection collect i
total = [0,0,0]
for i=2 to (obj.count-1) do (total += obj[i].max - obj[i].min)
format "Total X-size: %\n" total[1]
format "Total Y-size: %\n" total[2]
format "Total Z-size: %\n" total[3]
posMax = obj[obj.count].min
posMin = obj[1].max
sp = (posMax-posMin-total)/(obj.count-1)
sp.x
obj[2].pos.x = posMin.x + sp.x + (obj[2].max.x-obj[2].min.x )/2
for i=3 to (obj.count-1) do -- (obj.count-2)
(
totalzong = [0,0,0]
totalzong += obj[i-1].max - obj[i-1].min -- (obj.count-3)
format "Total X-size: %\n" total[1]
format "Total Y-size: %\n" total[2]
format "Total Z-size: %\n" total[3]

obj[i].pos.x = posMin.x + sp.x * (i-1) + totalzong.x + (obj[i].max.x-obj[i].min.x )/2

)

Reply to su37
JokerMartini

What exactly are you trying to do?
Are you trying to space the objects, taking into account the objects dimensions?

JokerMartini

su37

im not quite sure i understand what you are talking about.
If you could try and explain in more detail or possible and image example I would love to help out.

Right now the script spaces objects based on an equal distance between object's pivots. Not taking into account the objects dimensions.

JokerMartini

su37

im not quite sure i understand what you are talking about.
If you could try and explain in more detail or possible and image example I would love to help out.

Right now the script spaces objects based on an equal distance between object's pivots. Not taking into account the objects dimensions.

su37

Hi JokerMartini,
I have a suggestion:
The maximum value of each object to the minimum of the next object is equal , but not now Pivot distance is equal , Do you realize spacing distance between objects
is equal ?

crystal3d

it would be great to use this

when you want to create quick previews for lots of models...

just place the models in a row and animate the camera, save outputs etc...

Reply to crystal3d
crystal3d

One thing though...

It would be alot better if it did treat groups as on object and distribute them accordingly...

grouped objects are messed up if they have individual pivots...

titane357

Thanks for the script !
It would be nice to be able to select all objects, even end and/or start objects. So we can be rid of warning. :-)

Michele Marcelli

Thanks John, this is a great script!!!! One point to you :) ;)

JokerMartini

Glad

I'm glad to hear this us useful for a lot of people.
Does anyone have any ideas on ways to further develop this?
I'd be sure to jump on board and add anything people might want to see in this.

Reply to JokerMartini
sergo

randomness and interactivity

It would be very cool If you could add some kind of random options:

  1. randomness in ordering - to have more diverse row of objects. (I think just turning off the ordering would be sufficient)
  2. randomness in intervals - to have objects aligned in more natural way.
  3. randomness in positioning - to have objects aligned not in straight line but a little bit scattered. (this could be accompished by using some other scripts, but th second option could not be accomplished considering non-orthogonal aligning)

And other (little bit harder to implement) option is interactivity - to have an ability to move the head or tail and objects between them rebuilt interactively. This could happen only during the script window is open.

Reply to sergo
JokerMartini

Great Ideas.

Great ideas Sergo. I've gone ahead and added the random offsetting. You can get some cool results with it.

You are more than welcome to dive into the code if you want and add to it. I'm cool with that.

Incorporating your other ideas as well as a bias on the positioning would be very cool.

Reply to JokerMartini
sergo

I'll try to add random intervals and interactivity as soon as I can. Thank you!

Reply to sergo
JokerMartini

Random

I've added the random.
check it out.

If you want to go ahead and add something to this I'll hold off on messing with it until you are done.
back and forth kinda thing. That way we both are messing with it at the same time.

Attachments
jungbae

gooooooood!!

sergo

This is the most amazing little tool. Another one is Shuffle.
Thank you, you've made my job lot easier.

Raymond Homme Ingebretsen

First thing that crossed my mind when i saw this was:

What about add functionality that lets you pick for example an spline and make the possibility to make an loft/profile of the spline between these 2 points?

Nice script by the way :)

tommym

Get in line

This may have a lot of potential.
Will it do the same on vectors from a center point?
Thanks from Paul

Reply to tommym
JokerMartini

Develop

If everyone wants to, we could all dive into further developing this if wanted.

We could first start a wishlist, because I could see this being very useful as well.