From 7ae4c3a01923cccfa372072b880507c58557f45a Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 12 Dec 2017 10:19:55 +1100 Subject: Add eyedropper to color-ramp widget D2886 by @LazyDodo with edit's by @campbellbarton The line drawn with the eyedropper is used to fill the color-ramp. --- source/blender/editors/interface/interface_ops.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/interface/interface_ops.c') diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 47b7e9aa085..9c72942a575 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -1128,6 +1128,8 @@ void ED_operatortypes_ui(void) /* external */ WM_operatortype_append(UI_OT_eyedropper_color); + WM_operatortype_append(UI_OT_eyedropper_colorband); + WM_operatortype_append(UI_OT_eyedropper_colorband_point); WM_operatortype_append(UI_OT_eyedropper_id); WM_operatortype_append(UI_OT_eyedropper_depth); WM_operatortype_append(UI_OT_eyedropper_driver); @@ -1144,6 +1146,8 @@ void ED_keymap_ui(wmKeyConfig *keyconf) /* eyedroppers - notice they all have the same shortcut, but pass the event * through until a suitable eyedropper for the active button is found */ WM_keymap_add_item(keymap, "UI_OT_eyedropper_color", EKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "UI_OT_eyedropper_colorband", EKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "UI_OT_eyedropper_colorband_point", EKEY, KM_PRESS , KM_ALT, 0); WM_keymap_add_item(keymap, "UI_OT_eyedropper_id", EKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "UI_OT_eyedropper_depth", EKEY, KM_PRESS, 0, 0); @@ -1166,4 +1170,5 @@ void ED_keymap_ui(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "ANIM_OT_keyingset_button_remove", KKEY, KM_PRESS, KM_ALT, 0); eyedropper_modal_keymap(keyconf); + eyedropper_colorband_modal_keymap(keyconf); } -- cgit v1.2.3