|
Blender V4.3
|
#include "BLI_math_vector.h"#include "BLI_rect.h"#include "BLI_time.h"#include "BKE_context.hh"#include "BKE_screen.hh"#include "WM_api.hh"#include "RNA_access.hh"#include "ED_screen.hh"#include "view3d_intern.hh"#include "view3d_navigate.hh"Go to the source code of this file.
Functions | |
View Zoom Operator | |
| void | viewzoom_modal_keymap (wmKeyConfig *keyconf) |
| static void | view_zoom_to_window_xy_camera (Scene *scene, const Depsgraph *depsgraph, View3D *v3d, ARegion *region, float dfac, const int zoom_xy[2]) |
| static void | view_zoom_to_window_xy_3d (ARegion *region, float dfac, const int zoom_xy[2]) |
| static float | viewzoom_scale_value (const rcti *winrct, const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_invert_force, const int xy_curr[2], const int xy_init[2], const float val, const float val_orig, double *r_timer_lastdraw) |
| static float | viewzoom_scale_value_offset (const rcti *winrct, const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_invert_force, const int xy_curr[2], const int xy_init[2], const int xy_offset[2], const float val, const float val_orig, double *r_timer_lastdraw) |
| static void | viewzoom_apply_camera (ViewOpsData *vod, const int xy[2], const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_to_pos) |
| static void | viewzoom_apply_3d (ViewOpsData *vod, const int xy[2], const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_to_pos) |
| static void | viewzoom_apply (ViewOpsData *vod, const int xy[2], const eViewZoom_Style viewzoom, const bool zoom_invert) |
| static int | viewzoom_modal_impl (bContext *C, ViewOpsData *vod, const eV3D_OpEvent event_code, const int xy[2]) |
| static void | view_zoom_apply_step (bContext *C, const Depsgraph *depsgraph, Scene *scene, ScrArea *area, ARegion *region, const int delta, const int zoom_xy[2]) |
| static int | viewzoom_exec (bContext *C, wmOperator *op) |
| static int | viewzoom_invoke_impl (bContext *C, ViewOpsData *vod, const wmEvent *event, PointerRNA *ptr) |
| static int | viewzoom_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | VIEW3D_OT_zoom (wmOperatorType *ot) |
Variables | |
| const ViewOpsType | ViewOpsType_zoom |
| void VIEW3D_OT_zoom | ( | wmOperatorType * | ot | ) |
Definition at line 529 of file view3d_navigate_view_zoom.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, ViewOpsType::idname, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_XY, ot, wmOperatorType::poll, V3D_OP_PROP_DELTA, V3D_OP_PROP_MOUSE_CO, V3D_OP_PROP_USE_MOUSE_INIT, view3d_navigate_cancel_fn(), view3d_navigate_modal_fn(), view3d_operator_properties_common(), view3d_zoom_or_dolly_poll(), ViewOpsType_zoom, viewzoom_exec(), and viewzoom_invoke().
Referenced by view3d_operatortypes().
|
static |
Definition at line 385 of file view3d_navigate_view_zoom.cc.
References depsgraph, RegionView3D::dist, ED_region_tag_redraw(), ED_view3d_camera_lock_autokey(), ED_view3d_camera_lock_check(), ED_view3d_camera_lock_sync(), ED_view3d_dist_range_get(), RegionView3D::is_persp, RegionView3D::persp, RV3D_BOXVIEW, RV3D_CAMOB, RV3D_LOCK_FLAGS, view3d_boxview_sync(), view_zoom_to_window_xy_3d(), and view_zoom_to_window_xy_camera().
Referenced by viewzoom_exec(), and viewzoom_invoke_impl().
| zoom_xy | Optionally zoom to window location (coords compatible w/ wmEvent.xy). Use when not nullptr. |
Definition at line 113 of file view3d_navigate_view_zoom.cc.
References add_v3_v3v3(), copy_v3_v3(), RegionView3D::dist, ED_view3d_calc_zfac(), ED_view3d_win_to_delta(), float, madd_v3_v3v3fl(), negate_v3(), negate_v3_v3(), and RegionView3D::ofs.
Referenced by view_zoom_apply_step(), and viewzoom_apply_3d().
|
static |
| zoom_xy | Optionally zoom to window location (coords compatible w/ wmEvent.xy). Use when not nullptr. |
Definition at line 60 of file view3d_navigate_view_zoom.cc.
References BKE_screen_view3d_zoom_from_fac(), BKE_screen_view3d_zoom_to_fac(), BLI_rctf_transform_pt_v(), BLI_rctf_translate(), RegionView3D::camdx, RegionView3D::camdy, RegionView3D::camzoom, CLAMP, clamp_f(), depsgraph, ED_view3d_calc_camera_border(), float, RV3D_CAMZOOM_MAX, RV3D_CAMZOOM_MAX_FACTOR, RV3D_CAMZOOM_MIN, RV3D_CAMZOOM_MIN_FACTOR, sub_v2_v2v2(), and rctf::xmin.
Referenced by view_zoom_apply_step(), and viewzoom_apply_camera().
|
static |
Definition at line 331 of file view3d_navigate_view_zoom.cc.
References ED_view3d_camera_lock_check(), RegionView3D::is_persp, RegionView3D::persp, ViewOpsData::rv3d, RV3D_CAMOB, ViewOpsData::v3d, ViewOpsData::viewops_flag, VIEWOPS_FLAG_ZOOM_TO_MOUSE, viewzoom_apply_3d(), viewzoom_apply_camera(), and xy.
Referenced by viewzoom_invoke_impl(), and viewzoom_modal_impl().
|
static |
Definition at line 289 of file view3d_navigate_view_zoom.cc.
References ViewOpsData::area, CLAMP, ViewOpsData::depsgraph, RegionView3D::dist, ViewOpsData::dist, ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), ED_view3d_dist_range_get(), ViewOpsData::event_xy, ViewOpsData::event_xy_offset, ViewOpsData::init, ViewOpsData::prev, ViewOpsData::region, ViewOpsData::rv3d, RV3D_BOXVIEW, RV3D_LOCK_FLAGS, ViewOpsData::time, ViewOpsData::v3d, view3d_boxview_sync(), view_zoom_to_window_xy_3d(), viewzoom_scale_value_offset(), ARegion::winrct, and xy.
Referenced by viewzoom_apply().
|
static |
Definition at line 254 of file view3d_navigate_view_zoom.cc.
References BKE_screen_view3d_zoom_to_fac(), RegionView3D::camzoom, ViewOpsData::camzoom, ViewOpsData::depsgraph, ED_region_tag_redraw(), ELEM, ViewOpsData::event_xy, ViewOpsData::event_xy_offset, ViewOpsData::init, ViewOpsData::prev, ViewOpsData::region, ViewOpsData::rv3d, ViewOpsData::scene, ViewOpsData::time, ViewOpsData::v3d, view_zoom_to_window_xy_camera(), viewzoom_scale_value_offset(), ARegion::winrct, and xy.
Referenced by viewzoom_apply().
|
static |
Definition at line 436 of file view3d_navigate_view_zoom.cc.
References BLI_assert, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, depsgraph, ED_view3d_camera_lock_undo_grouped_push(), wmOperatorType::name, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), RNA_struct_property_is_set(), wmOperator::type, USER_ZOOM_TO_MOUSEPOS, and view_zoom_apply_step().
Referenced by VIEW3D_OT_zoom().
|
static |
Definition at line 524 of file view3d_navigate_view_zoom.cc.
References view3d_navigate_invoke_impl(), and ViewOpsType_zoom.
Referenced by VIEW3D_OT_zoom().
|
static |
Definition at line 467 of file view3d_navigate_view_zoom.cc.
References ViewOpsData::area, BLI_time_now_seconds(), CTX_wm_manager(), CTX_wm_window(), ViewOpsData::depsgraph, ED_view3d_camera_lock_autokey(), ELEM, ViewOpsData::event_xy, ViewOpsData::init, MOUSEPAN, MOUSEZOOM, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::prev, wmEvent::prev_xy, ptr, ViewOpsData::region, RNA_property_int_get(), RNA_property_is_set(), RNA_struct_find_property(), ViewOpsData::rv3d, ViewOpsData::scene, ViewOpsData::time, TIMER, ViewOpsData::timer, wmEvent::type, USER_ZOOM_CONTINUE, USER_ZOOM_DOLLY, USER_ZOOM_HORIZ, USER_ZOOM_INVERT, ViewOpsData::v3d, VIEW_CONFIRM, VIEW_PASS, view_zoom_apply_step(), ViewOpsData::viewops_flag, VIEWOPS_FLAG_ZOOM_TO_MOUSE, viewzoom_apply(), WM_event_timer_add(), and xy.
|
static |
Definition at line 348 of file view3d_navigate_view_zoom.cc.
References CTX_wm_manager(), ED_screen_animation_playing(), ED_view3d_camera_lock_autokey(), OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ret, ViewOpsData::rv3d, ViewOpsData::state_restore(), USER_ZOOM_INVERT, ViewOpsData::v3d, VIEW_APPLY, VIEW_CANCEL, VIEW_CONFIRM, VIEW_PASS, viewzoom_apply(), and xy.
| void viewzoom_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 29 of file view3d_navigate_view_zoom.cc.
References wmKeyMap::modal_items, VIEW_MODAL_CANCEL, VIEW_MODAL_CONFIRM, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ROTATE, WM_modalkeymap_assign(), WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by view3d_keymap().
|
static |
Definition at line 151 of file view3d_navigate_view_zoom.cc.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_time_now_seconds(), float, len_v2v2_int(), max_ff(), time, UI_SCALE_FAC, USER_ZOOM_CONTINUE, USER_ZOOM_HORIZ, USER_ZOOM_SCALE, rcti::xmax, and rcti::ymax.
Referenced by viewzoom_scale_value_offset().
|
static |
Definition at line 224 of file view3d_navigate_view_zoom.cc.
References viewzoom_scale_value().
Referenced by viewzoom_apply_3d(), and viewzoom_apply_camera().
| const ViewOpsType ViewOpsType_zoom |
Definition at line 553 of file view3d_navigate_view_zoom.cc.
Referenced by view3d_navigate_event(), view3d_navigation_type_from_idname(), VIEW3D_OT_zoom(), and viewzoom_invoke().