|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "BLI_math_vector.h"#include "BLI_string.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_idtype.hh"#include "BKE_report.hh"#include "BKE_screen.hh"#include "RNA_access.hh"#include "UI_interface.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_outliner.hh"#include "ED_screen.hh"#include "ED_space_api.hh"#include "ED_view3d.hh"#include "eyedropper_intern.hh"#include "interface_intern.hh"Go to the source code of this file.
Classes | |
| struct | DataDropper |
Functions | |
| static void | datadropper_draw_cb (const bContext *, ARegion *, 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, wmWindow *win, ScrArea *area, DataDropper *ddr, const int event_xy[2], ID **r_id) |
| get the ID from the 3D view or outliner. | |
| static bool | datadropper_id_set (bContext *C, DataDropper *ddr, ID *id) |
| static bool | datadropper_id_sample (bContext *C, DataDropper *ddr, const int event_xy[2]) |
| static void | datadropper_cancel (bContext *C, wmOperator *op) |
| static void | datadropper_set_draw_callback_region (ScrArea *area, DataDropper *ddr) |
| static int | datadropper_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static int | datadropper_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static int | datadropper_exec (bContext *C, wmOperator *op) |
| static bool | datadropper_poll (bContext *C) |
| void | UI_OT_eyedropper_id (wmOperatorType *ot) |
|
static |
Definition at line 228 of file eyedropper_datablock.cc.
References wmOperator::customdata, datadropper_exit(), datadropper_id_set(), and DataDropper::init_id.
Referenced by datadropper_modal(), and UI_OT_eyedropper_id().
Definition at line 64 of file eyedropper_datablock.cc.
References eyedropper_draw_cursor_text_region(), DataDropper::name, and DataDropper::name_pos.
Referenced by datadropper_init(), and datadropper_set_draw_callback_region().
|
static |
Definition at line 319 of file eyedropper_datablock.cc.
References datadropper_exit(), datadropper_init(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by UI_OT_eyedropper_id().
|
static |
Definition at line 114 of file eyedropper_datablock.cc.
References DataDropper::art, CTX_wm_window(), wmOperator::customdata, DataDropper::draw_handle_pixel, ED_region_draw_cb_exit(), WM_cursor_modal_restore(), and WM_event_add_mousemove().
Referenced by datadropper_cancel(), datadropper_exec(), and datadropper_modal().
|
static |
Definition at line 215 of file eyedropper_datablock.cc.
References datadropper_id_sample_pt(), datadropper_id_set(), and eyedropper_win_area_find().
Referenced by datadropper_modal().
|
static |
get the ID from the 3D view or outliner.
Definition at line 137 of file eyedropper_datablock.cc.
References BKE_area_find_region_xy(), copy_v2_v2_int(), CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_window(), CTX_wm_window_set(), Object::data, ED_outliner_give_base_under_cursor(), ED_region_tag_redraw(), ED_view3d_give_base_under_cursor(), ELEM, GS, ID_OB, DataDropper::idcode, DataDropper::idcode_name, DataDropper::name, DataDropper::name_pos, Base::object, DataDropper::prop, DataDropper::ptr, RGN_TYPE_WINDOW, RNA_id_pointer_create(), RNA_property_pointer_poll(), SNPRINTF, SPACE_OUTLINER, and SPACE_VIEW3D.
Referenced by datadropper_id_sample(), and datadropper_modal().
|
static |
Definition at line 201 of file eyedropper_datablock.cc.
References 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 70 of file eyedropper_datablock.cc.
References DataDropper::art, BKE_idtype_idcode_to_name(), BKE_regiontype_from_id(), BKE_spacetype_from_id(), BLI_assert, 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, 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_, 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 301 of file eyedropper_datablock.cc.
References 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 260 of file eyedropper_datablock.cc.
References BKE_report(), 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, eyedropper_win_area_find(), DataDropper::is_undo, MOUSEMOVE, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::reports, RPT_WARNING, wmEvent::type, wmEvent::val, and wmEvent::xy.
Referenced by UI_OT_eyedropper_id().
|
static |
Definition at line 331 of file eyedropper_datablock.cc.
References CTX_wm_window(), uiBut::flag, ID_OB, OB_DATA_SUPPORT_ID, PROP_POINTER, ptr, RNA_property_pointer_type(), RNA_property_type(), RNA_type_to_ID_code(), uiBut::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 236 of file eyedropper_datablock.cc.
References DataDropper::art, BKE_area_find_region_type(), BKE_regiontype_from_id(), 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 355 of file eyedropper_datablock.cc.
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().