Page 1 of 1

selected objects order

Posted: Thu Dec 16, 2004 1:23 pm
by lb
Is there a way to get a list of the selected objects in the same order they were (mouse-)selected, not by their name?

thanks.

lb

Posted: Thu Dec 16, 2004 1:37 pm
by theeth
AFAIK, there's no selected order. There's just a difference between Active and Selected (which are independant states btw).

Martin

Posted: Thu Dec 16, 2004 1:49 pm
by lb
ARGHHH !!! too bad.

I'm -trying- to add an object alignment fonctionality.
The idea is to align the objects on a line defined by 2 'static' ones (not only X, Y or Z axis). The two 'static' objects would have been the first and the last selected objects...

It works quite well, but only with the first and last created, which makes my fonctionality quite unusable...

Any idea ?

lb

Posted: Thu Dec 16, 2004 4:22 pm
by joeri
find the selected object that's the farest from the active one and assume that's the one to align to.

Posted: Thu Dec 16, 2004 4:52 pm
by lb
This only could be a palliative solution. :?

Is there a way to ask the user to select one object to set the other reference (with the active one) ?

thanks.

lb

Posted: Thu Dec 16, 2004 5:23 pm
by joeri
In blender all tools are actions.
User selects stuff and then aplies an action.

Your function should stick to that rule (I think).
So, because we cannot have two objects active you are in trouble.

Another dirty solution would be to set a "I'm an aligner" flag.
select an object and make it an aligner (by pressing a button orso)
select lot's of objects and 1 active one and press "align".
Blender searches for the aligner object and aligns all selected between the aligner and the active one (the reset the aligner flag).

Posted: Thu Dec 16, 2004 11:52 pm
by NateTG
Use the cursor as the other aligner object.

Posted: Fri Dec 17, 2004 9:41 am
by lb
Sure, that's a great idea !!!
(why did'nt I thought about this !!! :wink: )

Now, how can I get the cursor position ?

thanks,

lb

Posted: Fri Dec 17, 2004 3:38 pm
by lb
... found !

lb

Alignment panel (was: selected objects order)

Posted: Wed Jan 05, 2005 10:36 am
by lb
Hello,

I finaly managed to write an alignment panel.

Could someone test it ?

thanks.

Happy new year !

lb