Paint Mode for Area Mask

Issue #203 new
Hombre created an issue

During my editing, I missed to possibility to use Area Mask to add areas to the previously selected Parametric Mask and Similar Color Mask. The code actually paint the Area Mask in a layer that is used to clip the previous selection.

Could we add a Paint Mode toggle button in the Area Mask tool please ? The tooltip could be :

  • Paint over : paint the shapes over the previous selection (could be the new default IMHO)
  • Clip (actual mechanism) : paint the shapes in a separate mask that will clip the previous selection

That way, ART will be backward compatible. It’s also better to let the user chose.

If you agree, I can do the code.

Comments (6)

  1. agriggio repo owner

    sounds good, thanks! This is already supported by the brush mask, so please make sure you use the same interface and UI

  2. Hombre reporter

    I understood just now, by looking at the code, that the DrawnMask can be set in Add bounded mode because the Area Mask does actually clip everything. In the code, it’s done by drawing before or after the Area Mask. If I add an Intersect/Add mode to the Area Mask, the DrawnMask’s Add bounded mode will turn up to be an Add mode, which we could explain in the tooltip. Is it okay or should I still clip those Drawn Mask to something ?

    IMHO, this new option will make the UI a bite less intuitive. That’s not the scope of this issue, but to be more predictable, I think that the Drawn Mask could be included in the Area Mask. The Erase mode is nothing else than the area’s Substract boolean mode. Not sure that it won’t break backward compatibility though.

  3. agriggio repo owner

    Ideally, I'd like the current UI and logic to stay as is. I think the area mask should not affect the brush, even in this new mode. That is, the brush mask should always be able to modify everything depending only on its selected mode. I understand the code might become a bit more complicated under the hood, but it seems to me the cleanest solution wrt UI complexity and backwards compatibility. However, I'm open to alternative suggestions

  4. Hombre reporter

    I have no suggestion that could preserve backward compatibility, at least user friendly, so I’ll add the required logic to keep everything as is.

  5. Hombre reporter

    @agriggio : I can think of it for hours, I don’t see what could be the internal logic to have a different mask between DrawnMask Add and AddBounded when ShapeMask will be in Add mode. In either case, backward compatibility will be granted, but I have a suggestion to clarify the use of masks for users :

    • delete the AddBounded mode in DrawnMask
    • replace it by an up/down icon in the header of the DrawnMask section to move it before/after the AreaMask
    • convert the procparams AddBounded mode at load time by the Add mode + set a new BeforeArea boolean

    That way it is easy to preserve backward compatibility and the user will visually understand what’s going on :

    1. Select area with Parametric mask
    2. Select or intersect with Color selection mask
    3. Add or Intersect with Area mask
    4. Add or Intersect with Drawn mask

    or

    1. Select area with Parametric mask
    2. Select or intersect with Color selection mask
    3. Add or Intersect with Drawn mask
    4. Add or Intersect with Area mask

    Is this acceptable to you ?

  6. agriggio repo owner

    the way it could be done is to have two copies of the area mask, one for limiting the effect of the drawn mask, and the other for adding to the effect of the parametric and/or color mask.

    But I think your suggestion is good, and in practical terms it's probably easier to understand. So, I'm happy with that, thanks!

  7. Log in to comment