Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-12-13 07:35:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-12-13 07:38:11 +0300
commit611752ce334a04acbc7439a0220f57f05fca1e48 (patch)
treefb49a610ae0bbdae7966b56753b6dc3e6f157c55 /source/blender/editors/interface
parentef8bbc8cbaf5f9253b01fa20a895f189bd02d713 (diff)
UI: color-band eyedropper now combines samples
Resulting color-band was too noisy (especially with photos), use gauss filter to take surrounding samples into account.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_eyedropper_colorband.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_colorband.c b/source/blender/editors/interface/interface_eyedropper_colorband.c
index 655c2c46c6c..85339ff0322 100644
--- a/source/blender/editors/interface/interface_eyedropper_colorband.c
+++ b/source/blender/editors/interface/interface_eyedropper_colorband.c
@@ -165,7 +165,9 @@ static void eyedropper_colorband_exit(bContext *C, wmOperator *op)
static void eyedropper_colorband_apply(bContext *C, wmOperator *op)
{
EyedropperColorband *eye = op->customdata;
- BKE_colorband_init_from_table_rgba(eye->color_band, eye->color_buffer, eye->color_buffer_len);
+ /* Always filter, avoids noise in resulting color-band. */
+ bool filter_samples = true;
+ BKE_colorband_init_from_table_rgba(eye->color_band, eye->color_buffer, eye->color_buffer_len, filter_samples);
RNA_property_update(C, &eye->ptr, eye->prop);
}