|
Blender
V2.93
|
#include "MEM_guardedalloc.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "BLI_string.h"#include "BLT_translation.h"#include "BKE_context.h"#include "BKE_idtype.h"#include "BKE_report.h"#include "BKE_screen.h"#include "RNA_access.h"#include "UI_interface.h"#include "WM_api.h"#include "WM_types.h"#include "ED_outliner.h"#include "ED_screen.h"#include "ED_space_api.h"#include "ED_view3d.h"#include "interface_eyedropper_intern.h"#include "interface_intern.h"Go to the source code of this file.
Classes | |
| struct | DataDropper |
Typedefs | |
| typedef struct DataDropper | DataDropper |
Functions | |
| static void | datadropper_draw_cb (const struct bContext *C, ARegion *region, void *arg) |
| static int | datadropper_init (bContext *C, wmOperator *op) |
| static void | datadropper_exit (bContext *C, wmOperator *op) |
| 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. More... | |
| static bool | datadropper_id_set (bContext *C, DataDropper *ddr, ID *id) |
| static bool | datadropper_id_sample (bContext *C, DataDropper *ddr, int mx, int my) |
| static void | datadropper_cancel (bContext *C, wmOperator *op) |
| static void | datadropper_set_draw_callback_region (bContext *C, DataDropper *ddr, const int mx, const int my) |
| static int | datadropper_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static int | datadropper_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) |
| static int | datadropper_exec (bContext *C, wmOperator *op) |
| static bool | datadropper_poll (bContext *C) |
| void | UI_OT_eyedropper_id (wmOperatorType *ot) |
| typedef struct DataDropper DataDropper |
|
static |
Definition at line 239 of file interface_eyedropper_datablock.c.
References C, wmOperator::customdata, datadropper_exit(), datadropper_id_set(), and DataDropper::init_id.
Referenced by datadropper_modal(), and UI_OT_eyedropper_id().
Definition at line 77 of file interface_eyedropper_datablock.c.
References C, eyedropper_draw_cursor_text_region(), and DataDropper::name.
Referenced by datadropper_init(), and datadropper_set_draw_callback_region().
|
static |
Definition at line 331 of file interface_eyedropper_datablock.c.
References C, datadropper_exit(), datadropper_init(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by UI_OT_eyedropper_id().
|
static |
Definition at line 126 of file interface_eyedropper_datablock.c.
References DataDropper::art, C, CTX_wm_window(), wmOperator::customdata, DataDropper::draw_handle_pixel, ED_region_draw_cb_exit(), if(), MEM_freeN, NULL, WM_cursor_modal_restore(), and WM_event_add_mousemove().
Referenced by datadropper_cancel(), datadropper_exec(), and datadropper_modal().
|
static |
Definition at line 231 of file interface_eyedropper_datablock.c.
References C, datadropper_id_sample_pt(), datadropper_id_set(), and NULL.
Referenced by datadropper_modal().
|
static |
get the ID from the 3D view or outliner.
Definition at line 151 of file interface_eyedropper_datablock.c.
References blender::compositor::area(), BKE_area_find_region_xy(), BKE_screen_find_area_xy(), BLI_snprintf(), C, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_screen(), Object::data, ED_outliner_give_base_under_cursor(), ED_region_tag_redraw(), ED_view3d_give_base_under_cursor(), ELEM, GS, id, ID_OB, DataDropper::idcode, DataDropper::idcode_name, DataDropper::name, ID::name, NULL, Base::object, DataDropper::prop, DataDropper::ptr, RGN_TYPE_WINDOW, RNA_id_pointer_create(), RNA_property_pointer_poll(), SPACE_OUTLINER, SPACE_VIEW3D, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by datadropper_id_sample(), and datadropper_modal().
|
static |
Definition at line 215 of file interface_eyedropper_datablock.c.
References C, NULL, PointerRNA::owner_id, DataDropper::prop, DataDropper::ptr, RNA_id_pointer_create(), RNA_property_pointer_get(), RNA_property_pointer_set(), and RNA_property_update().
Referenced by datadropper_cancel(), and datadropper_id_sample().
|
static |
Definition at line 83 of file interface_eyedropper_datablock.c.
References DataDropper::art, BKE_idtype_idcode_to_name(), BKE_regiontype_from_id(), BKE_spacetype_from_id(), BLI_assert, C, CTX_wm_area(), DataDropper::cursor_area, wmOperator::customdata, PointerRNA::data, datadropper_draw_cb(), DataDropper::draw_handle_pixel, ED_region_draw_cb_activate(), DataDropper::idcode, DataDropper::idcode_name, DataDropper::init_id, DataDropper::is_undo, MEM_callocN, MEM_freeN, NULL, PointerRNA::owner_id, DataDropper::prop, PROP_POINTER, DataDropper::ptr, ptr, REGION_DRAW_POST_PIXEL, RGN_TYPE_WINDOW, RNA_property_editable(), RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_property_type(), RNA_type_to_ID_code(), SPACE_VIEW3D, TIP_, type, UI_but_flag_is_set(), UI_BUT_UNDO, and UI_context_active_but_prop_get().
Referenced by datadropper_exec(), and datadropper_invoke().
|
static |
Definition at line 313 of file interface_eyedropper_datablock.c.
References C, CTX_wm_region(), CTX_wm_window(), datadropper_init(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, UI_context_active_but_clear(), WM_CURSOR_EYEDROPPER, WM_cursor_modal_set(), and WM_event_add_modal_handler().
Referenced by UI_OT_eyedropper_id().
|
static |
Definition at line 277 of file interface_eyedropper_datablock.c.
References BKE_report(), C, wmOperator::customdata, datadropper_cancel(), datadropper_exit(), datadropper_id_sample(), datadropper_id_sample_pt(), datadropper_set_draw_callback_region(), EVT_MODAL_MAP, EYE_MODAL_CANCEL, EYE_MODAL_SAMPLE_CONFIRM, if(), DataDropper::is_undo, MOUSEMOVE, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::reports, RPT_WARNING, wmEvent::type, wmEvent::val, wmEvent::x, and wmEvent::y.
Referenced by UI_OT_eyedropper_id().
|
static |
Definition at line 343 of file interface_eyedropper_datablock.c.
References C, CTX_wm_window(), uiBut::flag, ID_OB, NULL, OB_DATA_SUPPORT_ID, PROP_POINTER, ptr, RNA_property_pointer_type(), RNA_property_type(), RNA_type_to_ID_code(), uiBut::type, type, UI_BTYPE_SEARCH_MENU, UI_BUT_VALUE_CLEAR, and UI_context_active_but_prop_get().
Referenced by UI_OT_eyedropper_id().
|
static |
Definition at line 247 of file interface_eyedropper_datablock.c.
References blender::compositor::area(), DataDropper::art, BKE_area_find_region_type(), BKE_regiontype_from_id(), BKE_screen_find_area_xy(), C, CTX_wm_screen(), DataDropper::cursor_area, datadropper_draw_cb(), DataDropper::draw_handle_pixel, ED_region_draw_cb_activate(), ED_region_draw_cb_exit(), ED_region_tag_redraw(), REGION_DRAW_POST_PIXEL, RGN_TYPE_WINDOW, and ScrArea::spacetype.
Referenced by datadropper_modal().
| void UI_OT_eyedropper_id | ( | wmOperatorType * | ot | ) |
Definition at line 366 of file interface_eyedropper_datablock.c.
References wmOperatorType::cancel, datadropper_cancel(), datadropper_exec(), datadropper_invoke(), datadropper_modal(), datadropper_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_ui().