selected objects order

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
lb
Posts: 0
Joined: Wed Mar 31, 2004 1:21 pm

selected objects order

Post 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

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth »

AFAIK, there's no selected order. There's just a difference between Active and Selected (which are independant states btw).

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

lb
Posts: 0
Joined: Wed Mar 31, 2004 1:21 pm

Post 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

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

find the selected object that's the farest from the active one and assume that's the one to align to.

lb
Posts: 0
Joined: Wed Mar 31, 2004 1:21 pm

Post 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

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post 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).

NateTG
Posts: 37
Joined: Mon Oct 14, 2002 2:38 am
Location: Here

Post by NateTG »

Use the cursor as the other aligner object.

lb
Posts: 0
Joined: Wed Mar 31, 2004 1:21 pm

Post 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

lb
Posts: 0
Joined: Wed Mar 31, 2004 1:21 pm

Post by lb »

... found !

lb

lb
Posts: 0
Joined: Wed Mar 31, 2004 1:21 pm

Alignment panel (was: selected objects order)

Post by lb »

Hello,

I finaly managed to write an alignment panel.

Could someone test it ?

thanks.

Happy new year !

lb

Post Reply