272 switch (event->
val) {
277 const bool is_undo = ddr->
is_undo;
363 ot->
name =
"Eyedropper Data-Block";
365 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)
void CTX_wm_window_set(bContext *C, struct wmWindow *win)
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(short idcode)
void BKE_report(ReportList *reports, eReportType type, const char *message)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
struct ARegion * BKE_area_find_region_xy(struct ScrArea *area, int regiontype, const int xy[2]) ATTR_NONNULL(3)
struct SpaceType * BKE_spacetype_from_id(int spaceid)
struct ARegionType * BKE_regiontype_from_id(const struct SpaceType *st, int regionid)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
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
bool ED_region_draw_cb_exit(struct ARegionType *art, void *handle)
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)
static int datadropper_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void datadropper_set_draw_callback_region(ScrArea *area, DataDropper *ddr)
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 void datadropper_draw_cb(const struct bContext *UNUSED(C), ARegion *UNUSED(region), void *arg)
static void datadropper_id_sample_pt(bContext *C, wmWindow *win, ScrArea *area, DataDropper *ddr, const int m_xy[2], ID **r_id)
get the ID from the 3D view or outliner.
static int datadropper_exec(bContext *C, wmOperator *op)
static int datadropper_init(bContext *C, wmOperator *op)
static bool datadropper_id_sample(bContext *C, DataDropper *ddr, const int m_xy[2])
struct DataDropper DataDropper
static void datadropper_cancel(bContext *C, wmOperator *op)
@ EYE_MODAL_SAMPLE_CONFIRM
void datadropper_win_area_find(const struct bContext *C, const int mval[2], int r_mval[2], struct wmWindow **r_win, struct ScrArea **r_area)
void eyedropper_draw_cursor_text_region(const int xy[2], const char *name)
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])
static const pxr::TfToken st("st", pxr::TfToken::Immortal)
bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop)
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)
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)