-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Agx UI toe shoulder sliders and primaries rotations #19642
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
base: master
Are you sure you want to change the base?
Agx UI toe shoulder sliders and primaries rotations #19642
Conversation
|
Back to draft, checking an alternative way to calculate pivot y. |
src/iop/agx.c
Outdated
|
|
||
| if(g && p) | ||
| { | ||
| dt_bauhaus_slider_set_hard_min(g->basic_curve_controls.curve_pivot_x_relative_ev, p->range_black_relative_ev); |
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.
Haven't reviewed or tested this, so this is more a general remark that may have little relevance here. For _from_params sliders, the intent is to have hard min/max set from the params $MIN $MAX values and keep them unchanged. That way we know that any validation imposed on the params based on introspection will enforce the same limits as the ui and hopefully can prevent modules crashing even if values set via some other means. Of course these are very simple per-field limits and don't enforce any consistency among variables. It may be possible to achieve consistency by changing this ev adjustment to some kind of proportional value (0-1 of the currently allowed range) but that may make the ui interaction awkward? You can still have the slider show the same values by setting appropriate offset and factor. Again, I'm perfectly fine if you ignore here, but something to keep in mind as an additional nice-to-have.
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.
It used to be a proportional value -- well, 2 'proportional values': -1 to 0 to shift towards black, 0 to 1 to shift towards white. The steps in the two directions were not the same (e.g. black relative EV -10, white 6; -0.1 meant -1 EV, +0.1 meant 0.6 EV).
I'll have to look into offset and factor, I don't know much about the UI.
src/iop/agx.c
Outdated
| dt_color_picker_new(self, DT_COLOR_PICKER_AREA | DT_COLOR_PICKER_DENOISE, | ||
| dt_bauhaus_slider_from_params(self, "range_white_relative_exposure")); | ||
| GtkWidget *white_slider = dt_bauhaus_slider_from_params(self, "range_white_relative_ev"); | ||
| dt_bauhaus_widget_set_module(white_slider, DT_ACTION(real_self)); |
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.
Again, haven't tested this, but are you sure passing the real_self along like this is neceesary? The intention of my changes to DT_IOP_SECTION_FOR_PARAMS is that this lookthrough is done automatically (i.e. that dt_bauhaus_slider_from_params and dt_color_picker_new sets the module based on the "real" self not on the fake one; see DT_IOP_SECTION_FOR_PARAMS_UNWIND). If that is not happening and you required this workaround then that's a bug and I'd rather fix it than work around it everywhere.
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.
I'll have to check, thanks.
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.
It's not needed for dt_color_picker_new, but is needed for g_signal_connect and dt_action_define_iop, otherwise get crash at startup or when the picker/button is clicked.
…m exposure data, using the heuristics from filmic RGB.
…ly fixed in the GUI framework
…ft-over debug code; inset/outset hard-limited to 0.99
…ix exposure picker tooltip
…tter visibility (no bar from neutral position to selected value)
… rotation sliders always painted with reversed hues (showing the effect)
…) to find 'best' exposure instance to read data from
…ce to imageop; refactored finding the 'exposure' instance in develop.c.
…posure (should always be called withe gui_data available)
…r, _setup_hue_slider.
7fa6e9f to
01e016d
Compare
01e016d to
9d0621d
Compare
| GtkLabel *deflicker_used_EC; | ||
| GtkWidget *compensate_exposure_bias; | ||
| GtkWidget *compensate_hilite_preserv; | ||
| volatile float effective_exposure; // used to cache the final computed exposure |
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.
No idea if volatile is really needed here -- could this be read/written in different threads without some synchronization mechanism guaranteeing visibility?
| { | ||
| dt_iop_exposure_gui_data_t *g = self->gui_data; | ||
| // should not be invoked when not in GUI mode | ||
| return g ? g->effective_exposure : 0.f; |
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.
I don't think it's ever invoked if gui_data is not available, so maybe the check should be removed?
…licking the slider resets to 0 EV
_exposure.c_,develop.*andimageop.*. Unlike filmic, no estimate (using hard-coded exposure of 0.7 and reading the EXIF) is used, and no adjustment is done inreload_defaults, as the exposure instance is not yet available when it is called. The previous method (picking the limits based on image content) also remains.The consequences: