[Bf-funboard] Storing object selection order

Jeffrey italic.rendezvous at gmail.com
Thu May 5 03:16:47 CEST 2016


+1 for saving selection orders. Another use could be in constraints. For
example, the IK constraint uses a target and a pole target. First
selected object could be IK target, second is pole target, third
(active) is the bone to add the constraint to. Currently you can select
the target bone, then constrained bone and make the constraint, but then
you need to manually select the pole target. Or select the IK target
bone, then the top of the chain for the chain length, then the
constrained bone.

Even adding a constraint to many pairs of bones could take advantage of
selection order. Select each pair of bones, add a track constraint and
it points the second of each pair to the first.

Utilizing selection order should be left up to the script author to take
advantage of. If that functionality is required for the script to work,
it would of course be noted in the usage instructions.

On 05/04/2016 05:52 PM, Gatis Kurzemnieks wrote:
> 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
>>

-- 
Jeffrey "Italic_" Hoover


More information about the Bf-funboard mailing list