[Bf-funboard] Storing object selection order

Gatis Kurzemnieks gatis.kurzemnieks at gmail.com
Thu May 5 02:52:25 CEST 2016


Well, I think this is the most easy way to have some sort of object order
input from user except object naming (which is inconvenient and now is the
only way things get sorted in outliner and dopesheet).

I think there would be many potential tools which could benefit from this
(including just everyday pipeline tools scripting to do something useful).
This is a very common behaviour in most other applications.
* First obvious example of tool that would need such information would be a
tool that creates a spline through centers of all selected objects in the
order of selection. (Or any other tool that creates something on multiple
selected objects where some sort of user defined order is important).
* Object distribution/align tools could be added/improved - to allow
aligning objects on certain axis in equal distances in-between them,
spreading out like array deformer etc. based on specific selectin order
* Renaming objects based on selection order

What I was trying to create is a simple keyframe step-offset tool that
would offset keyframes of each selected object by a step (0 for first
object, k for second, k*2 for third etc. Useful for motion graphics
effects). Order is very important here - based on specific scene art
direction.
Because dopesheet has no ability to sort objects (and is based on object
naming), this was the obvious solution. As I mentioned - new sorting mode
option could be added to dopesheet that displays objects based on selection
order. I know people have been asking sortig in dopesheet for a long time
(including me) - this would be easy fix.

Another option would be to finally implement manual sorting in outliner and
use that, but that I think would be even more confusing from UX standpoint.
Correct way would be to have both features and outliner providing correct
selection order when doing hierarhical selections (top-down order based on
hierarchies).
Selection order is a common UX feature in other 3d tools and I don't see a
way to not-have it for certain type of tools. *Honestly I don't understand
why It's not being saved in bpy.context.selected_objects_ordered. I really
see no benefit of losing that information. *

PS: One very cool feature based on selection order in Cinema4D is that you
can select multiple objects and enter expressions in any UI parameter box -
for example enter "num * 10" in Transform X channel box. As a result each
selected objects X transform would be set to 10 multiplied by it's number
in selection set, allowing to very quickly distribute objects in scene.
I think it's a very cool idea and could easily be added to blenders UI to
allow working with multiple selected objects more easy. Also this could be
added to expression syntax that can be entered when doing transforms in
viewport ( you can already enter math functions there. selection index
would be awesome addition there)

Thanks
Gatis


On Wed, May 4, 2016 at 5:21 PM gandalf3 <zzyxpaw at gmail.com> wrote:

> I'm not sure I like the idea of selection-order-dependent functions
> beyond what we have now with the active object, at least from a UX
> standpoint.
>
> Do you have any examples of tools that would benefit from such behavior?
>
> On 05/04/2016 03:13 PM, Gatis Kurzemnieks wrote:
> > Hi.
> > Is there a proper way to get selected objects in the order of selection?
> I
> > did search but could not found a proper way except doing ugly hacks.
> > Isn't it a reasonable and extremely easy feature to add? (Maybe just add
> > bpy.context.selected_objects_ordered to not break existing functionality
> or
> > something like that?)
> > It would be very useful for creating different operators that depend on
> > order of selection of objects or even adding option of sorting of
> channels
> > in dopesheet based on object selection order. etc.
> >
> > Thanks
> > Gatis
>
> _______________________________________________
> Bf-funboard mailing list
> Bf-funboard at blender.org
> https://lists.blender.org/mailman/listinfo/bf-funboard
>
-- 
Gatis Kurzemnieks
3d generalist, developer, artist
www.kurzemnieks.com


More information about the Bf-funboard mailing list