Blender V5.0
ViewOpsData Struct Reference

#include <view3d_navigate.hh>

Inherited by ViewOpsData_Utility.

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

Scenescene
ScrAreaarea
ARegionregion
View3Dv3d
RegionView3Drv3d
Depsgraph * depsgraph
wmTimertimer
struct { 
   float   ofs [3] 
   float   ofs_lock [2] 
   float   camdx 
   float   camdy 
   float   camzoom 
   float   dist 
   float   quat [4] 
   char   persp 
   char   view 
   char   view_axis_roll 
   char   persp_with_auto_persp_applied 
   blender::int2   event_xy 
   blender::int2   event_xy_offset 
   int   event_type 
   float   zfac 
   float   trackvec [3] 
   float   mousevec [3] 
   Dial *   dial 
init
struct { 
   int   event_xy [2] 
   double   time 
prev
struct { 
   float   viewquat [4] 
curr
const ViewOpsTypenav_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 109 of file view3d_navigate.hh.

Member Function Documentation

◆ end_navigation()

◆ init_context()

◆ init_navigation()

◆ state_backup()

void ViewOpsData::state_backup ( )

Definition at line 91 of file view3d_navigate.cc.

References copy_qt_qt(), copy_v2_v2(), copy_v3_v3(), init, and rv3d.

Referenced by init_navigation().

◆ state_restore()

Member Data Documentation

◆ area

◆ axis_snap

bool ViewOpsData::axis_snap

Definition at line 183 of file view3d_navigate.hh.

Referenced by view3d_navigate_event(), and viewrotate_apply().

◆ camdx

float ViewOpsData::camdx

Definition at line 128 of file view3d_navigate.hh.

◆ camdy

float ViewOpsData::camdy

Definition at line 128 of file view3d_navigate.hh.

◆ camzoom

float ViewOpsData::camzoom

Definition at line 129 of file view3d_navigate.hh.

Referenced by viewzoom_apply_camera().

◆ [struct]

struct { ... } ViewOpsData::curr

◆ depsgraph

◆ dial

Dial* ViewOpsData::dial

Used for roll

Definition at line 161 of file view3d_navigate.hh.

Referenced by viewroll_apply(), and viewroll_invoke().

◆ dist

float ViewOpsData::dist

Definition at line 130 of file view3d_navigate.hh.

Referenced by viewzoom_apply_3d().

◆ dyn_ofs

float ViewOpsData::dyn_ofs[3]

Use for orbit selection and auto-dist.

Definition at line 186 of file view3d_navigate.hh.

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

◆ event_type

int ViewOpsData::event_type

wmEvent.type that triggered the operator.

Definition at line 150 of file view3d_navigate.hh.

Referenced by view3d_navigate_event(), viewdolly_modal(), and viewroll_modal().

◆ event_xy [1/2]

int ViewOpsData::event_xy[2]

Definition at line 166 of file view3d_navigate.hh.

◆ event_xy [2/2]

blender::int2 ViewOpsData::event_xy

◆ event_xy_offset

blender::int2 ViewOpsData::event_xy_offset

◆ [struct]

◆ mousevec

float ViewOpsData::mousevec[3]

Dolly only.

Definition at line 158 of file view3d_navigate.hh.

Referenced by viewdolly_apply(), viewdolly_exec(), viewdolly_invoke(), viewroll_apply(), and viewroll_invoke().

◆ nav_type

const ViewOpsType* ViewOpsData::nav_type

◆ ofs

float ViewOpsData::ofs[3]

These variables reflect the same in RegionView3D.

Definition at line 126 of file view3d_navigate.hh.

Referenced by viewdolly_apply(), viewroll_apply(), and viewrotate_apply_dyn_ofs().

◆ ofs_lock

float ViewOpsData::ofs_lock[2]

Definition at line 127 of file view3d_navigate.hh.

◆ persp

char ViewOpsData::persp

Definition at line 132 of file view3d_navigate.hh.

◆ persp_with_auto_persp_applied

char ViewOpsData::persp_with_auto_persp_applied

RegionView3D.persp set after auto-perspective is applied. If we want the value before running the operator, add a separate member.

Definition at line 140 of file view3d_navigate.hh.

Referenced by view3d_navigate_event(), and viewrotate_apply_snap().

◆ [struct]

struct { ... } ViewOpsData::prev

◆ quat

float ViewOpsData::quat[4]

Definition at line 131 of file view3d_navigate.hh.

Referenced by viewroll_apply(), viewrotate_apply(), and viewrotate_apply_dyn_ofs().

◆ region

◆ reverse

float ViewOpsData::reverse

Definition at line 182 of file view3d_navigate.hh.

Referenced by init_navigation(), and viewrotate_apply().

◆ rv3d

◆ scene

Scene* ViewOpsData::scene

Context pointers (assigned by viewops_data_create).

Definition at line 111 of file view3d_navigate.hh.

Referenced by ED_view3d_navigation_do(), init_context(), viewzoom_apply_camera(), and viewzoom_invoke_impl().

◆ time

double ViewOpsData::time

For operators that use time-steps (continuous zoom).

Definition at line 168 of file view3d_navigate.hh.

Referenced by viewzoom_apply_3d(), viewzoom_apply_camera(), and viewzoom_invoke_impl().

◆ timer

wmTimer* ViewOpsData::timer

Needed for continuous zoom.

Definition at line 119 of file view3d_navigate.hh.

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

◆ trackvec

float ViewOpsData::trackvec[3]

Trackball rotation only.

Definition at line 156 of file view3d_navigate.hh.

Referenced by viewrotate_apply().

◆ use_dyn_ofs

bool ViewOpsData::use_dyn_ofs

◆ use_dyn_ofs_ortho_correction

bool 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 196 of file view3d_navigate.hh.

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

◆ v3d

◆ view

char ViewOpsData::view

Definition at line 133 of file view3d_navigate.hh.

◆ view_axis_roll

char ViewOpsData::view_axis_roll

Definition at line 134 of file view3d_navigate.hh.

◆ viewops_flag

eViewOpsFlag ViewOpsData::viewops_flag

Definition at line 180 of file view3d_navigate.hh.

Referenced by init_navigation(), viewzoom_apply(), and viewzoom_invoke_impl().

◆ viewquat

float ViewOpsData::viewquat[4]

Working copy of RegionView3D.viewquat, needed for rotation calculation so we can apply snap to the 3D Viewport while keeping the unsnapped rotation here to use when snap is disabled and for continued calculation.

Definition at line 176 of file view3d_navigate.hh.

Referenced by vieworbit_exec(), viewrotate_apply(), and viewrotate_apply_snap().

◆ zfac

float ViewOpsData::zfac

Initial distance to 'ofs'.

Definition at line 153 of file view3d_navigate.hh.

Referenced by viewmove_apply().


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