Light linking: Allow re-ordering in the light linking collections #112849

Merged
Sergey Sharybin merged 2 commits from Sergey/blender:light_linking_reorder into main 2023-09-25 18:00:37 +02:00

2 Commits

Author SHA1 Message Date
Sergey Sharybin b5e7f4770f Use less confusing tooltip
The light and shadow linking are using the same mechanism for
drag-n-drop, and referring to the light linking collection
when doing shadow linking collection manipulation could be
confusing.
2023-09-25 17:48:00 +02:00
Sergey Sharybin cbebde5eb0 Light linking: Allow re-ordering in the light linking collections
The order of collections in the light linking collection is important
as it is used for tie-breaking when the same object is reachable from
multiple linked collections with different light linking state.

This commit utilizes the generic tree view reordering operations to
allow insertion of elements to a specific location and to re-order
existing objects and collections in the light linking collection.

It is possible to re-order both collections and objects, even tough
re-ordering objects does not really make a difference for the light
linking behavior. It is not possible to place an object before
collections.

---

More user testing and tweaks is needed. Overall can't say the way
how the re-ordering feedback is done is really friendly. It becomes
too noisy to change tooltip. Much more friendly approach would be
to draw an insertion line which will give clear indication where an
item will be placed.

It is also possible to do more restrictive rules, like disable
objects re-ordering, or do some early outs when an object is
attempted to be inserted prior to collections. Not sure this is
something we want to have at all, or want to have from the get-go in
the initial patch.
2023-09-25 14:14:32 +02:00