-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
channelmixerrgb: display an error message when temperature.c does not… #6836
channelmixerrgb: display an error message when temperature.c does not… #6836
Conversation
If we're going to rely on a warning message on the CAT tab to prevent user error, I suppose we might be better off reverting #6793. |
Or set CAT tab active when an error is reported. Maybe a big annoying, but the user has to take some action anyway. |
It might be worth displaying a similar warning on the WB module where D65 isn't selected but CAT tab is enabled (or modern workflow is enabled). On old edits WB remains fully editable with all of its controls, regardless of the workflow setting. ... and if we could change the module header text to red or something for both modules that would be great. |
I wouldn't go as far as nagging users in white balance module too. There are legitimate reasons to not use the default coeffs in WB, for example because the Nikon input matrices tend to overdo the red, so the best option is to save a preset with a slightly reduced R coeff, compared to default D65. In that case, the alert would be annoying and a false positive. |
I was talking about old edits, where the module still displays all of its controls because the user hasn't yet reset it. |
Old edits should not use color calibration, there is no need to reset anything. If users choose to enable color calibration, they will see the message and take appropriate measures. Old edits should be status quo. |
Ok just trying to cover all bases here. Should the message in color calibration recommend resetting parameters in white balance instead of choosing camera reference, since this actually removes most of the controls from the module. Note there is an issue for old edits whereby the white balance module shows all of its controls but editing those controls has no effect. The user physically cannot select camera reference. Or perhaps I need to rebuild? (edit: no - still there) |
The 2 latest commits simplify things a lot.
Then, warning are displayed in white balance and color calibration modules, depending on the pipeline and inner states.
In case several color calibration instances are competing to capture Therefore, these checks are independent of workflows and states that are to be assumed externally, leading to brittle sets of tests and forgotten corner cases. Notice there are some glitches regarding GUI updates, you need to interact with the modules for the labels to be updated. They are supposed to be updated as soon as the pipeline recomputes too, but it doesn't work. |
01d2987
to
9c3f183
Compare
So, had the CAT in legacy mode for a new image, temperature is doing the WB. Enable channelmixer-rgb, CAT is bypassed as expected. set CAT to something like Daylight, then get warning about conflict with temperature module. Go down to temperature, disable it, and compress history stack. Now channelmixer-rgb complains about double CAT. There's only one instance, but the shift in position seems to have confused things. It's a bit hard to recover from this, maybe need to go back to lighttable, discard history, exit and re-enter darktable. [edit: oops, may have jumped the gun, let me pull those latest commits and retest] |
Another issue with this is enabling/disabling the local contrast module switches the method (bilateral vs. local laplacian) too. |
src/develop/imageop.c
Outdated
if(module->has_trouble != previous_state) | ||
_iop_gui_update_header(module); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove the conditionality here it resolves (mostly) the error where white balance module header isn't being updated when moving around the history stack. There still seems to potentially be an issue where you change the history while there is a pipe computation in progress so it's not 100% reliable but it's much better without this if statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a similar error when you discard history with modern workflow, whereby the color calibration header isn't updated until you click on it, but I've not been able to track it down yet. When discarding history the gui_changed function is called once and for some reason it thinks that the current module is not the CAT module: CAT_instance != current_instance
is true
. Presumably the gui needs to be updated after the pipe has completed but I don't know how to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating GUI after pipe finished is supposed to be done in _develop_ui_pipe_finished_callback()
in channelmixerrgb.c, connected to DT_DEBUG_CONTROL_SIGNAL_CONNECT(darktable.signals, DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED, G_CALLBACK(_develop_ui_pipe_finished_callback), self);
.
For some reason, that call is useless.
I've made some changes that I think solve most of the gui update issues I've found. Hopefully they're not to contentious. elstoc@edb65e5 |
… use camera reference white balance
display a warning sign in module header when has_trouble == TRUE
handles multi instances of channelmixerrgb too. adds another error on the 2nd and next instances doing CAT
advertize the use of D65 RGB coeff on the pipe, simplify channelmixerrgb handling
What on Earth is doing that? Never mind - try this commit: elstoc@a35e2c9. I think that fixes all the bugs now. |
Ok really I'm gonna stop testing now. One final attempt: elstoc@39afe42. As an aside: is this the best way to suggest changes to PRs? |
Thanks for patches, I will test soon. |
… use camera reference white balance
display a warning sign in module header when has_trouble == TRUE
handles multi instances of channelmixerrgb too. adds another error on the 2nd and next instances doing CAT
advertize the use of D65 RGB coeff on the pipe, simplify channelmixerrgb handling
The local contrast bug is still present, and now color calibration gets auto-applied with wrong settings on some older pictures, leading to full black images. |
6dd8a3f
to
ee59218
Compare
Seems to work as expected now. @TurboGit waiting for your review. |
Phew that took some work. Definitely pretty well user-proof now so I think it was worth it. |
I'll review tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
… use camera reference white balance