30#include "RNA_prototypes.hh"
99 rna_update_prop = &rna_ColorRamp_color_mode;
111 eye->
ptr = rna_update_ptr;
112 eye->
prop = rna_update_prop;
139 const int cursor[2] = {mx, my};
170 const bool filter_samples =
true;
172 reinterpret_cast<const float(*)[4]
>(eye->
color_buffer.data()),
199 switch (event->
val) {
204 const bool is_undo = eye->
is_undo;
236 switch (event->
val) {
320 ot->
name =
"Eyedropper Colorband";
321 ot->
idname =
"UI_OT_eyedropper_colorramp";
340 ot->
name =
"Eyedropper Colorband (Points)";
341 ot->
idname =
"UI_OT_eyedropper_colorramp_point";
void BKE_colorband_init_from_table_rgba(ColorBand *coba, const float(*array)[4], int array_len, bool filter_samples)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
wmWindow * CTX_wm_window(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
void BLI_bitmap_draw_2d_line_v2v2i(const int p1[2], const int p2[2], bool(*callback)(int, int, void *), void *user_data)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
Read Guarded memory(de)allocation.
constexpr PointerRNA PointerRNA_NULL
uiBut * UI_context_active_but_get(const bContext *C)
void UI_context_active_but_clear(bContext *C, wmWindow *win, ARegion *region)
bool UI_but_flag_is_set(uiBut *but, int flag)
void eyedropper_color_sample_fl(bContext *C, Eyedropper *eye, const int event_xy[2], float r_col[3])
@ EYE_MODAL_POINT_CONFIRM
@ EYE_MODAL_POINT_REMOVE_LAST
@ EYE_MODAL_SAMPLE_CONFIRM
static bool eyedropper_colorband_init(bContext *C, wmOperator *op)
static void eyedropper_colorband_cancel(bContext *C, wmOperator *op)
void UI_OT_eyedropper_colorramp(wmOperatorType *ot)
void UI_OT_eyedropper_colorramp_point(wmOperatorType *ot)
static int eyedropper_colorband_modal(bContext *C, wmOperator *op, const wmEvent *event)
static int eyedropper_colorband_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int eyedropper_colorband_exec(bContext *C, wmOperator *op)
static void eyedropper_colorband_sample_segment(bContext *C, EyedropperColorband *eye, const int m_xy[2])
static void eyedropper_colorband_apply(bContext *C, wmOperator *op)
static bool eyedropper_colorband_sample_callback(int mx, int my, void *userdata)
static void eyedropper_colorband_exit(bContext *C, wmOperator *op)
static void eyedropper_colorband_sample_point(bContext *C, EyedropperColorband *eye, const int m_xy[2])
static int eyedropper_colorband_point_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool eyedropper_colorband_poll(bContext *C)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_undo_check(const StructRNA *type)
EyedropperColorband * eye
Vector< float4 > color_buffer
ColorBand init_color_band
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)