Masks are lost when used in styles
Describe the bug
When a module in a style has a mask, this mask is not correctly re-applied with the style.
Steps to reproduce
- Start with a freshly reset image.
- Add a circle mask to the exposure module.
- Increase the exposure. This only affects the masked area.
- Create a style using the "3 circles" icon just right of the button "compress history stack". Include the exposure module.
- Reset the image history.
- Apply the style.
Result: The exposure module shows a mask-symbol, but the mask is fully opaque, so the exposure change is applied to the whole image.
Expected behavior
Darktable should apply the change only in the masked area.
Logfile | Screenshot | Screencast
No response
Commit
No response
Where did you obtain darktable from?
self compiled
darktable version
4.8.1, 8ded880839-dirty
What OS are you using?
Linux
What is the version of your OS?
Debian Bookworm
Describe your system?
I tested this on
- 4.8.1 from scoop on Windows 10
- 4.8.1 from Flathub on Debian Bookworm
- Current git 8ded880839-dirty on Debian Bookworm
Are you using OpenCL GPU in darktable?
No
If yes, what is the GPU card and driver?
No response
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
I'm not sure drawn masks have ever been included in styles. Parametric masks do get included, I have several styles which make use of them.
Well there is a mask-symbol besides the module (in the "mask column") when I create the style and there actually is a (broken) mask when I apply it. This is why I expect that the mask is stored with the style.
Yes, the parametric mask's values are stored in the style. Which, if you've only added drawn shapes, would select all of the pixels. As I said, I don't think drawn shapes have ever been included in styles (that's rather more complicated than the fixed set of parameters).
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
I plan to look at implementing this in the Spring. It appears that a reference to the shapes is stored in the style as part of the blendop parameters, because I've discovered that the shape does get applied by the style if it exists in the mask manager for the image (even if not currently used by any module).
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
Still planning to work on it, but... life. I did manage to look into it a bit over the summer and have a reasonably good idea of what I need to do to get it working.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.