283 switch (event->
val) {
288 const bool is_undo = ddr->
is_undo;
369 ot->
name =
"Eyedropper Data-Block";
371 ot->
description =
"Sample a data-block from the 3D View to store in a property";
struct ScrArea * CTX_wm_area(const bContext *C)
void CTX_wm_region_set(bContext *C, struct ARegion *region)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
void CTX_wm_area_set(bContext *C, struct ScrArea *area)
struct wmWindow * CTX_wm_window(const bContext *C)
const char * BKE_idtype_idcode_to_name(const short idcode)
void BKE_report(ReportList *reports, ReportType type, const char *message)
struct ScrArea * BKE_screen_find_area_xy(struct bScreen *screen, const int spacetype, int x, int y)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
struct ARegion * BKE_area_find_region_xy(struct ScrArea *area, const int regiontype, int x, int y)
struct SpaceType * BKE_spacetype_from_id(int spaceid)
struct ARegionType * BKE_regiontype_from_id(const struct SpaceType *st, int regionid)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
Object is a sort of wrapper for general info.
#define OB_DATA_SUPPORT_ID(_id_type)
struct Base * ED_outliner_give_base_under_cursor(struct bContext *C, const int mval[2])
void ED_region_tag_redraw(struct ARegion *region)
void * ED_region_draw_cb_activate(struct ARegionType *art, void(*draw)(const struct bContext *, struct ARegion *, void *), void *customdata, int type)
#define REGION_DRAW_POST_PIXEL
void ED_region_draw_cb_exit(struct ARegionType *, void *)
struct Base * ED_view3d_give_base_under_cursor(struct bContext *C, const int mval[2])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
short RNA_type_to_ID_code(const StructRNA *type)
void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region)
uiBut * UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
bool UI_but_flag_is_set(uiBut *but, int flag)
void eyedropper_draw_cursor_text_region(const struct bContext *C, const ARegion *region, const char *name)
static int datadropper_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool datadropper_id_sample(bContext *C, DataDropper *ddr, int mx, int my)
static int datadropper_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static bool datadropper_id_set(bContext *C, DataDropper *ddr, ID *id)
static void datadropper_exit(bContext *C, wmOperator *op)
static bool datadropper_poll(bContext *C)
void UI_OT_eyedropper_id(wmOperatorType *ot)
static int datadropper_exec(bContext *C, wmOperator *op)
static void datadropper_set_draw_callback_region(bContext *C, DataDropper *ddr, const int mx, const int my)
static int datadropper_init(bContext *C, wmOperator *op)
struct DataDropper DataDropper
static void datadropper_draw_cb(const struct bContext *C, ARegion *region, void *arg)
static void datadropper_id_sample_pt(bContext *C, DataDropper *ddr, int mx, int my, ID **r_id)
get the ID from the 3D view or outliner.
static void datadropper_cancel(bContext *C, wmOperator *op)
@ EYE_MODAL_SAMPLE_CONFIRM
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
PropertyType RNA_property_type(PropertyRNA *prop)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop_orig)
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
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)
void WM_event_add_mousemove(wmWindow *win)