|
Blender V5.0
|
#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 | |
| Scene * | scene |
| ScrArea * | area |
| ARegion * | region |
| View3D * | v3d |
| RegionView3D * | rv3d |
| Depsgraph * | depsgraph |
| wmTimer * | timer |
| 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 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 |
Generic View Operator Custom-Data
Definition at line 109 of file view3d_navigate.hh.
| void ViewOpsData::end_navigation | ( | bContext * | C | ) |
Definition at line 391 of file view3d_navigate.cc.
References BLI_dial_free(), C, CTX_wm_manager(), ED_region_tag_redraw(), init, region, rv3d, RV3D_NAVIGATING, timer, and WM_event_timer_remove().
Referenced by ED_view3d_navigation_do(), ED_view3d_navigation_free(), view3d_navigate_modal_fn(), viewops_data_free(), and vieworbit_exec().
| void ViewOpsData::init_context | ( | bContext * | C | ) |
Definition at line 80 of file view3d_navigate.cc.
References area, C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), depsgraph, region, rv3d, scene, and v3d.
Referenced by view3d_navigate_invoke_impl(), viewops_data_create(), ViewOpsData_Utility::ViewOpsData_Utility(), and vieworbit_exec().
| void 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 228 of file view3d_navigate.cc.
References add_v3_v3v3(), BLI_rcti_cent_x(), BLI_rcti_cent_y(), C, calctrackballvec(), closest_to_line_v3(), copy_qt_qt(), copy_v2_v2_int(), copy_v3_v3(), curr, depsgraph, dyn_ofs, ED_region_tag_redraw(), ED_view3d_calc_zfac(), ED_view3d_camera_lock_init_ex(), ED_view3d_persp_ensure(), ED_view3d_win_to_3d(), ED_view3d_win_to_vector(), ELEM, event_xy_offset, float, init, len_v3v3(), wmEvent::mval, nav_type, navigate_pivot_get(), NDOF_NAVIGATION_MODE_FLY, negate_v3(), negate_v3_v3(), prev, region, reverse, rv3d, RV3D_NAVIGATING, state_backup(), blender::math::transform_point(), U, use_dyn_ofs, use_dyn_ofs_ortho_correction, v3d, viewops_flag, VIEWOPS_FLAG_DEPTH_NAVIGATE, viewops_flag_from_prefs(), VIEWOPS_FLAG_INIT_ZFAC, VIEWOPS_FLAG_ORBIT_SELECT, VIEWOPS_FLAG_PERSP_ENSURE, VIEWOPS_FLAG_ZOOM_TO_MOUSE, wmEvent::xy, and zero_v2_int().
Referenced by view3d_navigation_invoke_generic(), viewops_data_create(), vieworbit_exec(), and viewroll_exec().
| 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().
| void ViewOpsData::state_restore | ( | ) |
Definition at line 106 of file view3d_navigate.cc.
References area, copy_qt_qt(), copy_v2_v2(), copy_v3_v3(), depsgraph, ED_view3d_camera_lock_check(), ED_view3d_camera_lock_sync(), ED_view3d_offset_lock_check(), init, region, rv3d, RV3D_BOXVIEW, RV3D_CAMOB, RV3D_LOCK_FLAGS, v3d, and view3d_boxview_sync().
Referenced by viewdolly_modal(), viewmove_modal_impl(), viewroll_modal(), viewrotate_modal_impl(), and viewzoom_modal_impl().
| ScrArea* ViewOpsData::area |
Definition at line 112 of file view3d_navigate.hh.
Referenced by init_context(), state_restore(), viewdolly_apply(), viewdolly_exec(), viewmove_apply(), viewroll_apply(), viewzoom_apply_3d(), and viewzoom_invoke_impl().
| bool ViewOpsData::axis_snap |
Definition at line 183 of file view3d_navigate.hh.
Referenced by view3d_navigate_event(), and viewrotate_apply().
| float ViewOpsData::camdx |
Definition at line 128 of file view3d_navigate.hh.
| float ViewOpsData::camdy |
Definition at line 128 of file view3d_navigate.hh.
| float ViewOpsData::camzoom |
Definition at line 129 of file view3d_navigate.hh.
Referenced by viewzoom_apply_camera().
| struct { ... } ViewOpsData::curr |
Current state.
Referenced by init_navigation(), vieworbit_exec(), viewrotate_apply(), and viewrotate_apply_snap().
| Depsgraph* ViewOpsData::depsgraph |
Definition at line 116 of file view3d_navigate.hh.
Referenced by ED_view3d_navigation_do(), init_context(), init_navigation(), state_restore(), viewdolly_apply(), viewmove_apply(), viewroll_apply(), viewroll_exec(), viewrotate_apply(), viewzoom_apply_3d(), viewzoom_apply_camera(), and viewzoom_invoke_impl().
| Dial* ViewOpsData::dial |
Used for roll
Definition at line 161 of file view3d_navigate.hh.
Referenced by viewroll_apply(), and viewroll_invoke().
| float ViewOpsData::dist |
Definition at line 130 of file view3d_navigate.hh.
Referenced by viewzoom_apply_3d().
| 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().
| 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().
| int ViewOpsData::event_xy[2] |
Definition at line 166 of file view3d_navigate.hh.
| blender::int2 ViewOpsData::event_xy |
The ones below are unrelated to the state of the 3D view. wmEvent.xy.
Definition at line 145 of file view3d_navigate.hh.
Referenced by viewdolly_apply(), viewdolly_invoke(), viewmove_apply(), viewpan_invoke_impl(), viewroll_invoke(), viewrotate_apply(), viewzoom_apply_3d(), viewzoom_apply_camera(), and viewzoom_invoke_impl().
| blender::int2 ViewOpsData::event_xy_offset |
Definition at line 148 of file view3d_navigate.hh.
Referenced by init_navigation(), viewrotate_apply(), viewzoom_apply_3d(), and viewzoom_apply_camera().
| struct { ... } ViewOpsData::init |
Viewport state on initialization, don't change afterwards.
Referenced by end_navigation(), init_navigation(), state_backup(), state_restore(), view3d_navigate_event(), viewdolly_apply(), viewdolly_exec(), viewdolly_invoke(), viewdolly_modal(), viewmove_apply(), viewroll_apply(), viewroll_invoke(), viewroll_modal(), viewrotate_apply(), viewrotate_apply_dyn_ofs(), viewrotate_apply_snap(), viewzoom_apply_3d(), viewzoom_apply_camera(), and viewzoom_invoke_impl().
| 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().
| const ViewOpsType* ViewOpsData::nav_type |
Definition at line 179 of file view3d_navigate.hh.
Referenced by ED_view3d_navigation_do(), init_navigation(), view3d_navigate_event(), and view3d_navigate_modal_fn().
| 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().
| float ViewOpsData::ofs_lock[2] |
Definition at line 127 of file view3d_navigate.hh.
| char ViewOpsData::persp |
Definition at line 132 of file view3d_navigate.hh.
| 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 { ... } ViewOpsData::prev |
Previous state (previous modal event handled).
Referenced by init_navigation(), viewdolly_invoke(), viewmove_apply(), viewpan_invoke_impl(), viewroll_invoke(), viewrotate_apply(), viewzoom_apply_3d(), viewzoom_apply_camera(), and viewzoom_invoke_impl().
| float ViewOpsData::quat[4] |
Definition at line 131 of file view3d_navigate.hh.
Referenced by viewroll_apply(), viewrotate_apply(), and viewrotate_apply_dyn_ofs().
| ARegion* ViewOpsData::region |
Definition at line 113 of file view3d_navigate.hh.
Referenced by ED_view3d_navigation_do(), end_navigation(), init_context(), init_navigation(), state_restore(), view3d_navigation_invoke_generic(), viewdolly_apply(), viewdolly_exec(), viewdolly_invoke(), viewmove_apply(), vieworbit_exec(), viewroll_apply(), viewroll_exec(), viewroll_invoke(), viewrotate_apply(), viewzoom_apply_3d(), viewzoom_apply_camera(), and viewzoom_invoke_impl().
| float ViewOpsData::reverse |
Definition at line 182 of file view3d_navigate.hh.
Referenced by init_navigation(), and viewrotate_apply().
| RegionView3D* ViewOpsData::rv3d |
Definition at line 115 of file view3d_navigate.hh.
Referenced by ED_view3d_navigation_do(), end_navigation(), init_context(), init_navigation(), state_backup(), state_restore(), view3d_navigate_event(), view3d_navigate_modal_fn(), viewdolly_apply(), viewdolly_invoke(), viewdolly_modal(), viewmove_apply(), viewmove_invoke_impl(), viewmove_modal_impl(), vieworbit_exec(), viewroll_apply(), viewroll_exec(), viewroll_invoke(), viewroll_modal(), viewrotate_apply(), viewrotate_apply_dyn_ofs(), viewrotate_apply_snap(), viewrotate_invoke_impl(), viewrotate_modal_impl(), viewzoom_apply(), viewzoom_apply_3d(), viewzoom_apply_camera(), viewzoom_invoke_impl(), and viewzoom_modal_impl().
| 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().
| 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().
| 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().
| float ViewOpsData::trackvec[3] |
Trackball rotation only.
Definition at line 156 of file view3d_navigate.hh.
Referenced by viewrotate_apply().
| bool ViewOpsData::use_dyn_ofs |
Definition at line 187 of file view3d_navigate.hh.
Referenced by init_navigation(), vieworbit_exec(), viewroll_apply(), viewroll_exec(), viewrotate_apply_dyn_ofs(), and viewrotate_invoke_impl().
| 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().
| View3D* ViewOpsData::v3d |
Definition at line 114 of file view3d_navigate.hh.
Referenced by ED_view3d_navigation_do(), init_context(), init_navigation(), state_restore(), view3d_navigate_modal_fn(), view3d_navigation_invoke_generic(), viewdolly_apply(), viewdolly_invoke(), viewdolly_modal(), viewmove_apply(), viewmove_invoke_impl(), viewmove_modal_impl(), vieworbit_exec(), viewroll_apply(), viewroll_exec(), viewroll_invoke(), viewroll_modal(), viewrotate_apply(), viewrotate_invoke_impl(), viewrotate_modal_impl(), viewzoom_apply(), viewzoom_apply_3d(), viewzoom_apply_camera(), viewzoom_invoke_impl(), and viewzoom_modal_impl().
| char ViewOpsData::view |
Definition at line 133 of file view3d_navigate.hh.
| char ViewOpsData::view_axis_roll |
Definition at line 134 of file view3d_navigate.hh.
| eViewOpsFlag ViewOpsData::viewops_flag |
Definition at line 180 of file view3d_navigate.hh.
Referenced by init_navigation(), viewzoom_apply(), and viewzoom_invoke_impl().
| 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().
| float ViewOpsData::zfac |
Initial distance to 'ofs'.
Definition at line 153 of file view3d_navigate.hh.
Referenced by viewmove_apply().