Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_camera_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "BKE_screen.h"
#include "BKE_unit.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "UI_interface.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_view3d.h"
#include "eyedropper_intern.h"
#include "interface_intern.h"
Go to the source code of this file.
Classes | |
struct | DepthDropper |
Typedefs | |
typedef struct DepthDropper | DepthDropper |
This file defines an eyedropper for picking 3D depth value (primary use is depth-of-field).
Defines:
Definition in file eyedropper_depth.c.
typedef struct DepthDropper DepthDropper |
|
static |
Definition at line 246 of file eyedropper_depth.c.
References C, wmOperator::customdata, depthdropper_depth_set(), depthdropper_exit(), DepthDropper::init_depth, and DepthDropper::is_set.
Referenced by depthdropper_modal(), and UI_OT_eyedropper_depth().
|
static |
Definition at line 227 of file eyedropper_depth.c.
References C, depthdropper_depth_sample_pt(), and depthdropper_depth_set().
Referenced by depthdropper_modal().
|
static |
Definition at line 236 of file eyedropper_depth.c.
References DepthDropper::accum_depth, DepthDropper::accum_tot, C, and depthdropper_depth_sample_pt().
Referenced by depthdropper_modal().
|
static |
get the ID from the screen.
Definition at line 142 of file eyedropper_depth.c.
References blender::compositor::area(), B_UNIT_LENGTH, BKE_area_find_region_xy(), BKE_screen_find_area_xy(), BKE_unit_value_as_string(), BLI_strncpy(), C, View3D::camera, copy_v2_v2_int(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_screen(), depsgraph, ED_region_tag_redraw(), ED_view3d_autodist(), ED_view3d_win_to_3d(), float(), len_v3v3(), DepthDropper::name, DepthDropper::name_pos, NULL, Object::obmat, RegionView3D::persp, ARegion::regiondata, RGN_TYPE_WINDOW, RV3D_CAMOB, scene, SPACE_TYPE_ANY, SPACE_VIEW3D, Scene::unit, view3d_operator_needs_opengl(), RegionView3D::viewinv, ARegion::winrct, ARegion::winx, ARegion::winy, rcti::xmin, and rcti::ymin.
Referenced by depthdropper_depth_sample(), and depthdropper_depth_sample_accum().
|
static |
Definition at line 209 of file eyedropper_depth.c.
References C, DepthDropper::is_set, DepthDropper::prop, DepthDropper::ptr, RNA_property_float_set(), and RNA_property_update().
Referenced by depthdropper_cancel(), depthdropper_depth_sample(), and depthdropper_depth_set_accum().
|
static |
Definition at line 217 of file eyedropper_depth.c.
References DepthDropper::accum_depth, DepthDropper::accum_tot, C, depthdropper_depth_set(), and float().
Referenced by depthdropper_modal().
|
static |
Definition at line 65 of file eyedropper_depth.c.
References eyedropper_draw_cursor_text_region(), DepthDropper::name, and DepthDropper::name_pos.
Referenced by depthdropper_init().
|
static |
Definition at line 321 of file eyedropper_depth.c.
References C, depthdropper_exit(), depthdropper_init(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by UI_OT_eyedropper_depth().
|
static |
Definition at line 121 of file eyedropper_depth.c.
References DepthDropper::art, C, CTX_wm_window(), wmOperator::customdata, DepthDropper::draw_handle_pixel, ED_region_draw_cb_exit(), if(), MEM_freeN, NULL, and WM_cursor_modal_restore().
Referenced by depthdropper_cancel(), depthdropper_exec(), and depthdropper_modal().
|
static |
Definition at line 73 of file eyedropper_depth.c.
References DepthDropper::art, BKE_id_is_editable(), BKE_regiontype_from_id(), BKE_spacetype_from_id(), C, View3D::camera, camera, CTX_data_main(), CTX_wm_region_view3d(), CTX_wm_view3d(), wmOperator::customdata, Object::data, PointerRNA::data, depthdropper_draw_cb(), DepthDropper::draw_handle_pixel, ED_region_draw_cb_activate(), DepthDropper::init_depth, DepthDropper::is_undo, MEM_callocN, MEM_freeN, NULL, RegionView3D::persp, DepthDropper::prop, PROP_FLOAT, DepthDropper::ptr, REGION_DRAW_POST_PIXEL, RGN_TYPE_WINDOW, RNA_pointer_create(), RNA_property_editable(), RNA_property_float_get(), RNA_property_type(), RNA_struct_find_property(), RV3D_CAMOB, SPACE_VIEW3D, usdtokens::st(), UI_but_flag_is_set(), UI_BUT_UNDO, and UI_context_active_but_prop_get().
Referenced by depthdropper_exec(), and depthdropper_invoke().
|
static |
Definition at line 303 of file eyedropper_depth.c.
References C, CTX_wm_region(), CTX_wm_window(), depthdropper_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_depth().
|
static |
Definition at line 256 of file eyedropper_depth.c.
References DepthDropper::accum_depth, DepthDropper::accum_start, DepthDropper::accum_tot, C, wmOperator::customdata, depthdropper_cancel(), depthdropper_depth_sample(), depthdropper_depth_sample_accum(), depthdropper_depth_set_accum(), depthdropper_exit(), EVT_MODAL_MAP, EYE_MODAL_CANCEL, EYE_MODAL_SAMPLE_BEGIN, EYE_MODAL_SAMPLE_CONFIRM, EYE_MODAL_SAMPLE_RESET, if(), DepthDropper::is_undo, MOUSEMOVE, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::type, wmEvent::val, and wmEvent::xy.
Referenced by UI_OT_eyedropper_depth().
Definition at line 333 of file eyedropper_depth.c.
References BKE_id_is_editable(), C, View3D::camera, CTX_data_main(), CTX_wm_region_view3d(), CTX_wm_view3d(), CTX_wm_window(), Object::data, NULL, RegionView3D::persp, PROP_FLOAT, PROP_UNIT_LENGTH, ptr, RNA_property_array_check(), RNA_property_subtype(), RNA_property_type(), RV3D_CAMOB, uiBut::type, UI_BTYPE_NUM, and UI_context_active_but_prop_get().
Referenced by UI_OT_eyedropper_depth().
void UI_OT_eyedropper_depth | ( | wmOperatorType * | ot | ) |
Definition at line 364 of file eyedropper_depth.c.
References wmOperatorType::cancel, depthdropper_cancel(), depthdropper_exec(), depthdropper_invoke(), depthdropper_modal(), depthdropper_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().