Blender V5.3
blender::ViewOpsData Struct Reference

#include <view3d_navigate.hh>

Inherited by blender::ViewOpsData_Utility.

Classes

struct  [struct].init
struct  [struct].prev
struct  [struct].curr

Public Member Functions

ViewOpsData definition
void init_context (bContext *C)
void state_backup ()
void state_restore ()
void init_navigation (bContext *C, const wmEvent *event, const ViewOpsType *nav_type, const float dyn_ofs_override[3]=nullptr, const bool use_cursor_init=false)
void end_navigation (bContext *C)

Public Attributes

Scene * scene
ScrArea * area
ARegion * region
View3D * v3d
RegionView3D * rv3d
Depsgraph * depsgraph
wmTimer * timer
struct  init
struct  prev
struct  curr
const ViewOpsType * nav_type
eViewOpsFlag viewops_flag
float reverse
bool axis_snap
float dyn_ofs [3]
bool use_dyn_ofs
bool use_dyn_ofs_ortho_correction

Detailed Description

Generic View Operator Custom-Data

Definition at line 115 of file view3d_navigate.hh.

Member Function Documentation

◆ end_navigation()

◆ init_context()

◆ init_navigation()

void blender::ViewOpsData::init_navigation ( bContext * C,
const wmEvent * event,
const ViewOpsType * nav_type,
const float dyn_ofs_override[3] = nullptr,
const bool use_cursor_init = false )

Definition at line 242 of file view3d_navigate.cc.

References blender::add_v3_v3v3(), blender::BLI_rcti_cent_x(), blender::BLI_rcti_cent_y(), C, blender::calctrackballvec(), blender::closest_to_line_v3(), blender::copy_qt_qt(), blender::copy_v2_v2_int(), blender::copy_v3_v3(), curr, depsgraph, blender::RegionView3D::dist, dyn_ofs, blender::ED_region_tag_redraw(), blender::ED_view3d_calc_zfac(), blender::ED_view3d_camera_lock_init_ex(), blender::ED_view3d_persp_ensure(), blender::ED_view3d_win_to_3d(), blender::ED_view3d_win_to_vector(), ELEM, blender::ViewOpsType::flag, float, init, blender::RegionView3D::is_persp, blender::len_v3v3(), blender::wmEvent::mval, nav_type, blender::navigate_pivot_get(), blender::NDOF_NAVIGATION_MODE_FLY, blender::negate_v3(), blender::negate_v3_v3(), blender::RegionView3D::ofs, blender::RegionView3D::persmat, blender::RegionView3D::persp, prev, region, reverse, blender::RegionView3D::rflag, rv3d, blender::RV3D_CAMOB, blender::RV3D_FLIP_X, blender::RV3D_NAVIGATING, state_backup(), blender::math::transform_point(), blender::U, use_dyn_ofs, use_dyn_ofs_ortho_correction, v3d, blender::RegionView3D::viewinv, viewops_flag, blender::VIEWOPS_FLAG_DEPTH_NAVIGATE, blender::viewops_flag_from_prefs(), blender::VIEWOPS_FLAG_INIT_ZFAC, blender::VIEWOPS_FLAG_ORBIT_SELECT, blender::VIEWOPS_FLAG_PERSP_ENSURE, blender::VIEWOPS_FLAG_ZOOM_TO_MOUSE, blender::RegionView3D::viewquat, blender::ARegion::winrct, blender::ARegion::winx, blender::ARegion::winy, blender::wmEvent::xy, and blender::zero_v2_int().

Referenced by blender::view3d_navigation_invoke_generic(), blender::viewops_data_create(), blender::vieworbit_exec(), and blender::viewroll_exec().

◆ state_backup()

◆ state_restore()

Member Data Documentation

◆ area

◆ axis_snap

bool blender::ViewOpsData::axis_snap

◆ curr

◆ depsgraph

◆ dyn_ofs

float blender::ViewOpsData::dyn_ofs[3]

Use for orbit selection and auto-dist.

Definition at line 194 of file view3d_navigate.hh.

Referenced by init_navigation(), blender::vieworbit_exec(), blender::viewroll_apply(), blender::viewroll_exec(), and blender::viewrotate_apply_dyn_ofs().

◆ init

◆ nav_type

◆ prev

◆ region

◆ reverse

float blender::ViewOpsData::reverse

Definition at line 190 of file view3d_navigate.hh.

Referenced by init_navigation(), and blender::viewrotate_apply().

◆ rv3d

◆ scene

Scene* blender::ViewOpsData::scene

◆ timer

wmTimer* blender::ViewOpsData::timer

Needed for continuous zoom.

Definition at line 125 of file view3d_navigate.hh.

Referenced by end_navigation(), blender::view3d_navigate_event(), and blender::viewzoom_invoke_impl().

◆ use_dyn_ofs

◆ use_dyn_ofs_ortho_correction

bool blender::ViewOpsData::use_dyn_ofs_ortho_correction

In orthographic views, a dynamic offset should not cause #RegionView3D::ofs to end up at a location that has no relation to the content where ofs originated or to dyn_ofs. Failing to do so can cause the orthographic views ofs to be far away from the content to the point it gets clipped out of the view. See view3d_orbit_apply_dyn_ofs code-comments for an example, also see: #104385.

Definition at line 204 of file view3d_navigate.hh.

Referenced by init_navigation(), blender::viewrotate_apply_dyn_ofs(), and blender::viewrotate_invoke_impl().

◆ v3d

◆ viewops_flag

eViewOpsFlag blender::ViewOpsData::viewops_flag

The documentation for this struct was generated from the following files: