It's handy to be able to re-use shapes once created using the mask manager.

I use parametric masks far more frequently than shapes and would like to be able to re-use - or even save for future use - some of the parametric masks.

e.g.: How often have you created a parametric mask that selects skin tones, blue sky, foliage or such? Selecting a pre-defined mask and fine-tuning it would significantly reduce number of clicks, work load and thus save time.

Adding parametric masks to the mask manager would be great! :-)

What do the devs think?

Related issues

Related to darktable - Feature #9768: masks are not recorded when making a style

Affected Version changed from git stable branch to git development version

% Done changed from 0 to 20

Status changed from New to Incomplete

Nope, that manager is only for drawn masks.As you have probably noticed, there is no way to copy those parametric masks.Because for any other module, for any other input they will result in different output..

The mask stays with the original module but can be applied in another module, but being the exact same mask, values calculated with the original module. That's kind of a linked mask. It could help to have a mask somewhere on the pipeline and use it somewhere else. One example: Sharpening is very high in the pipeline. It may be useful to have a mask that weights sharpening with the brightness such that the noise in dark areas is less amplified. Therefore, a very early parametric mask would be needed, before something like shadhi etc. is apllied. If I can reuse a mask on the pixel level, I am able to handle such problems. I could even have a deactivated module that just generates a mask at the right position in the pipeline to be used somewhere else.

Save masks like a preset, that means just the slider positions. That may be less helpful for different positions in the pipeline but could be helpful to exchange just masks between similar images, without copying the style.

I personally would find the first kind somehow helpful, especially to circumvent workflows with intermediate tiff files that are reimported into dt (see e.g. the tutorials by Harry Durgin, which are IMO extremely impressive but it is a cumbersome workflow - https://www.youtube.com/user/harrydurgin).

If I can add a suggestion (especially after having watched https://www.youtube.com/watch?v=D4_0mkkSIKo ) --- I would solve this by being able to save and export any mask as a greyscale png, and then import it. It will also be a great help in mixed DT-Gimp workflows when, if ever, Gimp will ship the more-than-8-bit depth thing.

How about a button that turns the selection created by the current parametric mask into a frozen mask that can then appear in the mask manager, similar to a drawn mask, which can then be applied in other places in the pipeline.

so I can go to - say - exposure, create my mask there and then re-use the same mask higher up in the pipeline...

This may have more benefits than just being able to re-use the parametric masks. IMO, the most important one is a much higher flexibility in combining the masks. Current exclusive/inclusive masks combination method works well for simple combination use-cases (e.g. single drawn mask). But it has limitations in advanced use-cases (e.g. multiple drawn masks - some combined exclusively, and others combined inclusively). Being able to combine parametric masks like drawn masks (using union, intersection, difference, and exclude operators) will make the already great masking capability a killer feature!