Blender
V3.3
|
#include "BLI_math.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "RNA_access.h"
#include "ED_screen.h"
#include "view3d_intern.h"
#include "view3d_navigate.h"
Go to the source code of this file.
Functions | |
View Dolly Operator | |
Like zoom but translates the view offset along the view direction which avoids RegionView3D.dist approaching zero. | |
void | viewdolly_modal_keymap (wmKeyConfig *keyconf) |
static bool | viewdolly_offset_lock_check (bContext *C, wmOperator *op) |
static void | view_dolly_to_vector_3d (ARegion *region, const float orig_ofs[3], const float dvec[3], float dfac) |
static void | viewdolly_apply (ViewOpsData *vod, const int xy[2], const bool zoom_invert) |
static int | viewdolly_modal (bContext *C, wmOperator *op, const wmEvent *event) |
static int | viewdolly_exec (bContext *C, wmOperator *op) |
static int | viewdolly_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static void | viewdolly_cancel (bContext *C, wmOperator *op) |
void | VIEW3D_OT_dolly (wmOperatorType *ot) |
void VIEW3D_OT_dolly | ( | wmOperatorType * | ot | ) |
Definition at line 323 of file view3d_navigate_dolly.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_GRAB_CURSOR_XY, ot, wmOperatorType::poll, V3D_OP_PROP_DELTA, V3D_OP_PROP_MOUSE_CO, V3D_OP_PROP_USE_MOUSE_INIT, view3d_operator_properties_common(), view3d_rotation_poll(), viewdolly_cancel(), viewdolly_exec(), viewdolly_invoke(), and viewdolly_modal().
Referenced by view3d_operatortypes().
|
static |
Definition at line 94 of file view3d_navigate_dolly.c.
References madd_v3_v3v3fl(), RegionView3D::ofs, and ARegion::regiondata.
Referenced by viewdolly_apply(), and viewdolly_exec().
|
static |
Definition at line 103 of file view3d_navigate_dolly.c.
References ViewOpsData::area, ViewOpsData::depsgraph, RegionView3D::dist, ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), ViewOpsData::event_xy, ViewOpsData::init, ViewOpsData::mousevec, ViewOpsData::ofs, ViewOpsData::region, ViewOpsData::rv3d, RV3D_BOXVIEW, RV3D_LOCK_FLAGS, SWAP, USER_ZOOM_HORIZ, ViewOpsData::v3d, view3d_boxview_sync(), view_dolly_to_vector_3d(), ARegion::winrct, rcti::xmax, xy, and rcti::ymax.
Referenced by viewdolly_invoke(), and viewdolly_modal().
|
static |
Definition at line 317 of file view3d_navigate_dolly.c.
References C, wmOperator::customdata, NULL, and viewops_data_free().
Referenced by VIEW3D_OT_dolly().
|
static |
Definition at line 192 of file view3d_navigate_dolly.c.
References blender::compositor::area(), ViewOpsData::area, C, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), ViewOpsData::init, ViewOpsData::mousevec, negate_v3(), negate_v3_v3(), normalize_v3(), normalize_v3_v3(), NULL, RegionView3D::ofs, OPERATOR_FINISHED, wmOperator::ptr, ViewOpsData::region, ARegion::regiondata, RNA_boolean_get(), RNA_int_get(), RV3D_BOXVIEW, RV3D_LOCK_FLAGS, USER_ZOOM_TO_MOUSEPOS, view3d_boxview_sync(), view_dolly_to_vector_3d(), RegionView3D::viewinv, and viewops_data_free().
Referenced by VIEW3D_OT_dolly(), and viewdolly_invoke().
|
static |
Definition at line 244 of file view3d_navigate_dolly.c.
References C, CTX_data_ensure_evaluated_depsgraph(), wmOperator::customdata, depsgraph, ED_region_tag_redraw(), ED_view3d_persp_switch_from_camera(), ED_view3d_smooth_view_force_finish(), ViewOpsData::event_xy, ViewOpsData::init, ViewOpsData::mousevec, MOUSEZOOM, negate_v3_v3(), normalize_v3(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RegionView3D::persp, ViewOpsData::prev, wmEvent::prev_xy, wmOperator::ptr, ViewOpsData::region, RNA_boolean_get(), RNA_int_set(), RNA_struct_property_is_set(), ViewOpsData::rv3d, RV3D_CAMOB, RV3D_PERSP, wmEvent::type, USER_ZOOM_HORIZ, USER_ZOOM_INVERT, USER_ZOOM_TO_MOUSEPOS, ViewOpsData::v3d, viewdolly_apply(), viewdolly_exec(), viewdolly_offset_lock_check(), RegionView3D::viewinv, viewops_data_create(), viewops_data_free(), viewops_flag_from_prefs(), VIEWOPS_FLAG_ORBIT_SELECT, VIEWOPS_FLAG_USE_MOUSE_INIT, WM_event_add_modal_handler(), and wmEvent::xy.
Referenced by VIEW3D_OT_dolly().
|
static |
Definition at line 138 of file view3d_navigate_dolly.c.
References C, CTX_wm_manager(), wmOperator::customdata, ED_screen_animation_playing(), ED_view3d_camera_lock_autokey(), ED_view3d_camera_lock_undo_push(), ViewOpsData::event_type, EVT_MODAL_MAP, ViewOpsData::init, KM_RELEASE, MOUSEMOVE, wmOperatorType::name, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ret, ViewOpsData::rv3d, wmOperator::type, wmEvent::type, USER_ZOOM_INVERT, ViewOpsData::v3d, wmEvent::val, VIEW_APPLY, VIEW_CONFIRM, VIEW_MODAL_CONFIRM, VIEW_PASS, viewdolly_apply(), viewops_data_free(), VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ROTATE, WM_OP_INVOKE_DEFAULT, WM_operator_name_call(), and wmEvent::xy.
Referenced by VIEW3D_OT_dolly().
void viewdolly_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 31 of file view3d_navigate_dolly.c.
References EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, KM_ANY, KM_PRESS, KM_RELEASE, LEFTMOUSE, wmKeyMap::modal_items, NULL, VIEW_MODAL_CONFIRM, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ROTATE, WM_modalkeymap_add_item(), WM_modalkeymap_assign(), WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by view3d_keymap().
|
static |
Definition at line 83 of file view3d_navigate_dolly.c.
References BKE_report(), C, CTX_wm_region_view3d(), CTX_wm_view3d(), ED_view3d_offset_lock_check(), wmOperator::reports, and RPT_WARNING.
Referenced by viewdolly_invoke().