Workflows and ability to modify selections
Closed, ResolvedPublic

Description

This ticket originally addresses this bug: https://bugs.kde.org/show_bug.cgi?id=369341

The bug only refers to resizing the selection by itself, but we might want to think about how we want to do other operations

  • Resizing
  • Moving
  • Rotating
  • editing points

Some references with how other applications do moving selections
GIMP - https://box.raghukamath.com/cloud/index.php/s/vPe0AZblUXv6b6b
Photoshop - https://youtu.be/tqiqwLtAORA?t=1m58s

We need to figure out how we want this interaction to work. We currently have two concepts of selections and we might need to work in the confines of their strengths and limitations.

  1. Pixel selections - can do boolean operations, but cannot do transforming
  2. Vector selections - can do transforming, moving, edit bezier points, but not boolean operations

We also need Dmitry to help us know what is in scope and what is going to be too much work.

Dmitry shared one idea of utilizing the global selection mask in conjunction with the transform tool to accomplish this: http://nonaynever.ru/pub/krita_transform_a_selection-2018-08-23_19.25.28.mkv

  • One approach that is really neat with Dmitry's direction is that we can use all transform options, including cage transform and liquefy
scottpetrovic updated the task description. (Show Details)
woltherav added a comment.EditedAug 23 2018, 7:50 PM

The last one is how it currently works within Krita, it is just that people cannot find this functionality because the global selection is hidden from the layer box by default to avoid confusing people.

I do not have any idea how we can make it easier to find, so I cannot add anything beyond that. :<

@woltherav yes. I think the idea for this is that we need to make it easier to find and use these tools. Having to go through all the steps the way it is shown in Dmitry's video is probably too many steps and not the easiest workflow.

One idea of how this might work that would align with what @dkazakov shows:

The person could right click on their selection on the canvas. There would be a new menu item with something like "Move/Transform Selection". Clicking that will automatically show the global selection and activate the transform tool so people can start moving and transforming the selection. There could also be a button in the tool options that would start this in case someone misses the right-click option.

That handles the moving and transforming, but not the node editing , rounding the rectangle selection part etc.

@kamathraghavendra - I wonder if we need two menu items then? Maybe we can have a second one that says "edit selection anchor ponts". Clicking that would automatically convert the selection to a vector selection if it wasn't one, then enter the mode to edit the anchor points.

I think editing the round rectangle points as a selection is going to be tricky. That would only be able to be done if there is just a rectangle selection potentially. Maybe @dkazakov could let us know if we want to mess with this. Even just getting the two above options with transforming and edit anchor points menu items would be a pretty awesome improvement.

I think editing the round rectangle points as a selection is going to be tricky.

we can already do that with vector selection, the same way as you can round the rectangle with corner handles in a vector rectangle shape.
here is a demo video of rounding rectangle using vector selection.

@kamathraghavendra - I wonder if we need two menu items then? Maybe we can have a second one that says "edit selection anchor ponts". Clicking that would automatically convert the selection to a vector selection if it wasn't one, then enter the mode to edit the anchor points.

That can be done, but it has one drawback, say you draw a rectangle selection and convert it to vector selection, the resulting vector selection is a path not rectangle shape where you can do the corner radius adjustment.

We need to somehow keep current vector selection ability as default selection method and add the missing part such as boolean operations to it. From the looks of it we have the required features but they are spread between vector and raster selection.

Note: if you have a vector selection when you paint on the global selection mask it becomes raster, i think dmitry had mentioned this on IRC.

In my opinion, we need the following things

  1. Being able to resize the shape selection like rectangle circle, even after we have drawn them, same way like you can resize vector shapes.

    a) GIMP shows a resize handle area to resize the shape such as rectangle and ellipse, while you can resize polygonal selection by dragging and editing the nodes before committing the selection by pressing enter. b) Photoshop does this with the help of a menu called transform selection, which enables transform handles around the selection, this can be equal to resizing selection mask with transform tool in Krita.
  1. Being able to move selection, this can be done is two ways

    a) Moving the selection with selection tool by left click and drag inside the selection area. Photoshop does this way. b) Moving the selection with the help of the tool option in move tool which enables move operation for only selections. GIMP does both these method, it has the option to switch between layer selection or path for both move and transform tools.
  1. In case of Polygon selection, being able to edit nodes

    a) We can do this already to polygon or bezier selection in vector selection mode. to edit you need to use shape handling tool.
scottpetrovic added a comment.EditedAug 24 2018, 4:41 PM

I talked with @kamathraghavendra I a bit over IRC. I think the direction we are starting to head down is trying to make the vector selections the default mode for adding and editing selections.

For this to happen though, we need to add a bit of functionality to vector selections. @dkazakov - can we get boolean operations with vector selections to work like they do with raster selections?

If we can get boolean operations for vector selections, I think that is going to create the most intuitive workflow for most of the selection methods. We will then just need to find out a good workflow for switching to painting on the selection...which will be a raster selection only path.

Hi, all!

I think I should sum up your discussion in the following set of requirements:

  1. Vector selections should support boolean operations
  2. The user should be able to move a selection (not layer's content) with normal selection tool
  3. Context menu for selections should have two actions:
    1. Convert to Vector/Raster
    2. Edit Selection (with showing global mask and activating a corresponding tool)
  4. Vector selection should become a default option
  5. When activated, selection tools should use the mode of the currently active selection mask (vector or raster) for new selections. Right now it just works inconsistently :)

@dkazakov that sounds about right!

rempt added a comment.Sep 4 2018, 2:24 PM

Hm... If we can move a selection without selecting the global selection or using the "edit selection" menu option, why can't we manipulate (drag borders, rotate) it in the same way? I was getting a bit confused about that.

yes boud good point.

In T9486#158789, @rempt wrote:

Hm... If we can move a selection without selecting the global selection or using the "edit selection" menu option, why can't we manipulate (drag borders, rotate) it in the same way? I was getting a bit confused about that.

Well, the point is nice, of course :) But it is not easy to implement. I have combined all the selection tools with a move tool that moves the selection mask, when the user clicks on a selections. To make the selection transformable, we will have to combine them with DefaultTool, KoCreatePathTool, KoPathTool and KisToolTransform. That is quite a lot of work, because all these tools will have to be first refactored to use KoInteractionTool framework :)

rempt added a comment.Sep 5 2018, 10:39 AM

Well, the point is nice, of course :) But it is not easy to implement. I have combined all the selection tools with a move tool that moves the selection mask, when the user clicks on a selections. To make the selection transformable, we will have to combine them with DefaultTool, KoCreatePathTool, KoPathTool and KisToolTransform. That is quite a lot of work, because all these tools will have to be first refactored to use KoInteractionTool framework :)

Right. Well, let's keep that in mind as well, because it would not only be nice for our users, but remove a lot of special casing from our tools.

dkazakov closed this task as Resolved.Sep 5 2018, 5:40 PM
dkazakov claimed this task.

Okay, all the wishes from this list are implemented. Vector Selections are a default now!

Storm reopened this task as Open.Sep 16 2018, 1:00 PM
Storm added a subscriber: Storm.

This was originally posted as a bug ticket (398643), and the discussion was moved here as suggested by Boud.

[15:32:21] <dmitryK|log> Storm-Engineer: ah, then please reopen the task on phabricator and ask deevad and raghukamath for an opinion.

I think the selection tool should not automatically change to another tool based on the cursor being inside the selection outline. I expect the selection tool to select - now instead I'm forced to hold down the modifier key of the respective selection mode (replace, Add, etc.) just to stop this automatic behavior.

This is a reversed logic: A tool changing into another tool on its own as we move it around, and having to hold down a key just to stop this and preserve the behavior we set it to. Moreover I have to hold a different key to preserve its behavior based on which mode I was in. This is confusing, inconsistent and counter-intuitive.

To see how the current behavior can go real bad create a complex selection, eg. by selecting on-continuous color ranges. This can result in a complex map of areas inside and outside the selection outline. Now if you move your cursor around your tool will perform a magic act: Now I'm selection tool... no wait, I'm move tool... no wait, I'm selection tool again!

Suggestion: Changing into a move selection tool should be invoked by holding a modifier key instead. This is more predictable and consistent behavior for both the selection and the move selection tools.

I understand the demand for an easy way to move selections, but automatically changing tools based on if the cursor is inside or outside the selection outline makes much less sense (esp. in case of complex selections) than changing them precisely when we want, and only if we want, via holding down a key.

Hi, @Storm!

I'm okay with changing move selection into a shortcut. But I need to know what shortcut to use :) Please suggest a logical shortcut for this tool mode :)

scottpetrovic added a comment.EditedSep 19 2018, 12:17 PM

I think we might want to have a bit more discussion with other artists on this before any work gets done. I have heard from at least one other artist that he wants it to work exactly like we have it now... moving your cursor inside an active selection allow you to move the selection.

We probably want to have that discussion before we start flip-flopping decisions.

I think the difference of opinion is going to be that Photoshop does it exactly how we do it now. Anyone that is familiar with Photoshop is going to probably be voting to keep it the way it is now. It might not be the best UX with what Storm is wanting though, so we might need to think through his use case and come up with a solution that can work well for everyone.

woltherav closed this task as Resolved.Apr 18 2019, 10:03 AM