Select completely covered layers

One of the greatest features of Synfigstudio is the ability to select a layer by just clicking on its render in the main window. This method fails if the layer you want to select is completely covered by other layer(s).
I would like to have the feature that if the user makes click in one position then the GUI have alternative behaviors depending on the circumstances:

  1. Clicking on the point x,y it would select the top layer in the stack that responses to the click.
  2. If there are more layers below (completely covered or not) then the user should have the opportunity to select the following layer in the stack that is under the click position. It can be done by doing CRTL up or CTRL down (arrows). It would loop along the layers that match the clicked point.
  3. If the user does SHIFT click then all the layers that match the click should be selected.

Do you think it would be useful? Is that the right behavior? Have you got an alternative idea?

Cheers!.

-G

#3 is easily doable, but #2 might be a bit harder. I’ll have a go at #3 when I’m back in Perth.

If #3 is doable why don’t #2?
What if #2 is like this?:

  1. If there are more layers below (completely covered or not) then the user should have the opportunity to select the following layer in the stack that is under the click position. It can be done by doing ALT + click. It would loop along the layers that match the clicked point.

An alternative way to perform the option #2 (the old one that doesn’t involve more mouse clicks) is storing the last click position in the application and doing a hit_check call for all layers than the top selected layer. The next one below that responds to ‘true’ is selected.

-G

How about this:

  • Click could select the topmost layer that hits the click
  • Alt+Click could select the layer above the currently selected layer that hits the click
  • Shift+Click could select the layer below the currently selected layer that hits the click
  • Ctrl+Click could select all the layers hitting the click
  • Ctrl+Alt+Click could select all the layers hitting the click above the currently selected layers
  • Ctrl+Shift+Click could select all the layers hitting the click below the currently selected layers
  • Not sure about Ctrl+Alt+Shift+Click

CTRL+click is already used for add layers to the selection (in different click places) so it is not valid for this new feature.

Current Ctrl+click is doing this:

  1. If the first layer that returns true from hit_check is selected then unselect it from the selected list.
  2. If the first layer that returns true from hit_check is NOT selected select it and add to the selection list.

I have to think more what’s the proposal for the other clicks - key combinations. Not trivial :slight_smile:
-G

Hmm, ok, will have to think about it some more.

Any other opinions?

OK. those are my thoughts:

l-click = Select one single layer placed on the most top layer under the position of the click.
CTRL+l-click = Add to current selection the most top layer under the position of the click.
ALT+l-click = Select one single layer placed below of the most top layer in current selection that is under the position of the click.
SHIFT+l-click = Select only all the layers under the click. If reached the end of the stack then continue with the beginning.
CTRL+ALT+l-click= Add to current selection the first layer not selected that is under the position of the click. If all the layers under the click position are selected don’t do anything.
CTRL+SHIFT+l-click=Add to current selection all the layers under the position of the click. If all they are already selected then unselect them all.
CTRL++ALT+SHIFT+l-click = ???

Examples:

Layers under the stack (capital letter means selected):
BEFORE:
a,b,C,d,E
AFTER l-click:
A,b,c,d,e
AFTER CTRL+l-click:
A,b,C,d,E
AFTER ALT+l-click:
a,b,C,D,E
AFTER ALT+l-click (again):
A,b,C,D,E
AFTER ALT+l-click (again):
A,B,C,D,E
AFTER SHIFT+l-click:
A,B,C,D,E
AFTER CTRL+SHIFT+l-click:
A,B,C,D,E
AFTER CTRL+SHIFT+l-click (again):
a,b,c,d,e

Any other thoughts?

-G

Sounds reasonable. I guess we’ll find out how usable it is when the code changes are made. Just need someone to add a patch (I’m a bit busy for now).