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>2019-01-18 01:29:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-18 01:29:47 +0300
commit7a0cc955cc0b13e69412ff64b83bea1fcbbb9206 (patch)
tree9eec83bf0280fea9ba9b2ac9bfbe748417f4fadc /source/blender/editors/interface/interface_eyedropper_color.c
parent8efedf2523e859e844a84247b167807196c0958e (diff)
Fix color picker cancel setting the color to black
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper_color.c')
-rw-r--r--source/blender/editors/interface/interface_eyedropper_color.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c
index 7bd98669a56..322d368dc27 100644
--- a/source/blender/editors/interface/interface_eyedropper_color.c
+++ b/source/blender/editors/interface/interface_eyedropper_color.c
@@ -100,22 +100,21 @@ static bool eyedropper_init(bContext *C, wmOperator *op)
eye->is_undo = UI_but_flag_is_set(but, UI_BUT_UNDO);
+ float col[4];
+ RNA_property_float_get_array(&eye->ptr, eye->prop, col);
if (RNA_property_subtype(eye->prop) != PROP_COLOR) {
Scene *scene = CTX_data_scene(C);
const char *display_device;
- float col[4];
display_device = scene->display_settings.display_device;
eye->display = IMB_colormanagement_display_get_named(display_device);
/* store initial color */
- RNA_property_float_get_array(&eye->ptr, eye->prop, col);
if (eye->display) {
IMB_colormanagement_display_to_scene_linear_v3(col, eye->display);
}
- copy_v3_v3(eye->init_col, col);
}
-
+ copy_v3_v3(eye->init_col, col);
return true;
}