Blender
V3.3
|
#include "DNA_curve_types.h"
#include "DNA_gpencil_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLT_translation.h"
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_gpencil_geom.h"
#include "BKE_layer.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_vfont.h"
#include "DEG_depsgraph_query.h"
#include "ED_mesh.h"
#include "ED_particle.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "WM_api.h"
#include "WM_message.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_resources.h"
#include "view3d_intern.h"
#include "view3d_navigate.h"
Go to the source code of this file.
Functions | |
Navigation Polls | |
static bool | view3d_navigation_poll_impl (bContext *C, const char viewlock) |
bool | view3d_location_poll (bContext *C) |
bool | view3d_rotation_poll (bContext *C) |
bool | view3d_zoom_or_dolly_poll (bContext *C) |
Generic View Operator Properties | |
void | view3d_operator_properties_common (wmOperatorType *ot, const enum eV3D_OpPropFlag flag) |
Generic View Operator Custom-Data | |
void | calctrackballvec (const rcti *rect, const int event_xy[2], float r_dir[3]) |
void | view3d_orbit_apply_dyn_ofs (float r_ofs[3], const float ofs_old[3], const float viewquat_old[4], const float viewquat_new[4], const float dyn_ofs[3]) |
void | viewrotate_apply_dyn_ofs (ViewOpsData *vod, const float viewquat_new[4]) |
bool | view3d_orbit_calc_center (bContext *C, float r_dyn_ofs[3]) |
static enum eViewOpsFlag | viewops_flag_from_args (bool use_select, bool use_depth) |
enum eViewOpsFlag | viewops_flag_from_prefs (void) |
ViewOpsData * | viewops_data_create (bContext *C, const wmEvent *event, enum eViewOpsFlag viewops_flag) |
void | viewops_data_free (bContext *C, ViewOpsData *vod) |
Generic View Operator Utilities | |
static void | axis_set_view (bContext *C, View3D *v3d, ARegion *region, const float quat_[4], char view, char view_axis_roll, int perspo, const float *align_to_quat, const int smooth_viewtx) |
void | viewmove_apply (ViewOpsData *vod, int x, int y) |
View All Operator | |
Move & Zoom the view to fit all of its contents. | |
static bool | view3d_object_skip_minmax (const View3D *v3d, const RegionView3D *rv3d, const Object *ob, const bool skip_camera, bool *r_only_center) |
static void | view3d_object_calc_minmax (Depsgraph *depsgraph, Scene *scene, Object *ob_eval, const bool only_center, float min[3], float max[3]) |
static void | view3d_from_minmax (bContext *C, View3D *v3d, ARegion *region, const float min[3], const float max[3], bool ok_dist, const int smooth_viewtx) |
static void | view3d_from_minmax_multi (bContext *C, View3D *v3d, const float min[3], const float max[3], const bool ok_dist, const int smooth_viewtx) |
static int | view3d_all_exec (bContext *C, wmOperator *op) |
void | VIEW3D_OT_view_all (wmOperatorType *ot) |
Frame Selected Operator | |
Move & Zoom the view to fit selected contents. | |
static int | viewselected_exec (bContext *C, wmOperator *op) |
void | VIEW3D_OT_view_selected (wmOperatorType *ot) |
View Center Cursor Operator | |
static int | viewcenter_cursor_exec (bContext *C, wmOperator *op) |
void | VIEW3D_OT_view_center_cursor (wmOperatorType *ot) |
View Center Pick Operator | |
static int | viewcenter_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
void | VIEW3D_OT_view_center_pick (wmOperatorType *ot) |
View Camera Operator | |
static int | view_camera_exec (bContext *C, wmOperator *op) |
void | VIEW3D_OT_view_camera (wmOperatorType *ot) |
View Orbit Operator | |
Rotate (orbit) in incremental steps. For interactive orbit see VIEW3D_OT_rotate. | |
enum | { V3D_VIEW_STEPLEFT = 1 , V3D_VIEW_STEPRIGHT , V3D_VIEW_STEPDOWN , V3D_VIEW_STEPUP } |
static const EnumPropertyItem | prop_view_orbit_items [] |
static int | vieworbit_exec (bContext *C, wmOperator *op) |
void | VIEW3D_OT_view_orbit (wmOperatorType *ot) |
View Pan Operator | |
Move (pan) in incremental steps. For interactive pan see VIEW3D_OT_move. | |
enum | { V3D_VIEW_PANLEFT = 1 , V3D_VIEW_PANRIGHT , V3D_VIEW_PANDOWN , V3D_VIEW_PANUP } |
static const EnumPropertyItem | prop_view_pan_items [] |
static int | viewpan_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
void | VIEW3D_OT_view_pan (wmOperatorType *ot) |
View Axis Operator | |
static const EnumPropertyItem | prop_view_items [] |
static int | view_axis_exec (bContext *C, wmOperator *op) |
void | VIEW3D_OT_view_axis (wmOperatorType *ot) |
anonymous enum |
Enumerator | |
---|---|
V3D_VIEW_STEPLEFT | |
V3D_VIEW_STEPRIGHT | |
V3D_VIEW_STEPDOWN | |
V3D_VIEW_STEPUP |
Definition at line 1408 of file view3d_navigate.c.
anonymous enum |
Enumerator | |
---|---|
V3D_VIEW_PANLEFT | |
V3D_VIEW_PANRIGHT | |
V3D_VIEW_PANDOWN | |
V3D_VIEW_PANUP |
Definition at line 1561 of file view3d_navigate.c.
|
static |
align_to_quat | When not NULL, set the axis relative to this rotation. |
Definition at line 449 of file view3d_navigate.c.
References C, View3D::camera, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), DEG_get_evaluated_object(), RegionView3D::dist, ED_region_tag_redraw(), ED_view3d_from_object(), ED_view3d_smooth_view(), mul_qt_qtqt(), negate_v3(), normalize_qt_qt(), NULL, RegionView3D::ofs, RegionView3D::persp, Object::quat, ARegion::regiondata, RV3D_CAMOB, RV3D_LOCK_FLAGS, RV3D_LOCK_ROTATION, RV3D_ORTHO, RV3D_VIEW_AXIS_ROLL_0, RV3D_VIEW_IS_AXIS, RV3D_VIEW_USER, USER_AUTOPERSP, USER_ORBIT_SELECTION, view, RegionView3D::view, view3d_orbit_calc_center(), and RegionView3D::view_axis_roll.
Referenced by view_axis_exec(), and view_camera_exec().
Definition at line 110 of file view3d_navigate.c.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), float(), len_v2(), M_SQRT2, min_ff(), size(), sqrtf, square_f(), t, and V3D_OP_TRACKBALLSIZE.
Referenced by viewops_data_create(), and viewrotate_apply().
|
static |
Definition at line 747 of file view3d_navigate.c.
References blender::compositor::area(), BASE_VISIBLE, BKE_scene_cursor_mat3_to_rot(), C, center, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_area(), CTX_wm_message_bus(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), Scene::cursor, DEG_get_evaluated_view_layer(), DEG_get_original_object(), DEG_id_tag_update(), depsgraph, ED_region_tag_redraw(), ED_view3d_camera_lock_check(), ED_view3d_clipping_clamp_minmax(), ED_view3d_smooth_view_undo_begin(), ED_view3d_smooth_view_undo_end(), ListBase::first, View3D::flag2, Scene::id, ID_RECALC_COPY_ON_WRITE, INIT_MINMAX, View3DCursor::location, max, min, wmOperatorType::name, Base::next, Base::object, ViewLayer::object_bases, OPERATOR_FINISHED, wmOperator::ptr, ARegion::regiondata, RNA_boolean_get(), RV3D_CLIPPING_ENABLED, scene, wmOperator::type, unit_m3(), V3D_LOCK_CAMERA, view3d_from_minmax(), view3d_from_minmax_multi(), view3d_object_calc_minmax(), view3d_object_skip_minmax(), WM_msg_publish_rna_prop, WM_operator_smooth_viewtx_get(), and zero_v3().
Referenced by VIEW3D_OT_view_all().
|
static |
Definition at line 636 of file view3d_navigate.c.
References C, View3D::camera, View3D::clip_start, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_view3d_camera_lock_check(), ED_view3d_radius_to_dist(), ED_view3d_smooth_view(), ED_view3d_smooth_view_force_finish(), RegionView3D::is_persp, max, max_ff(), max_fff(), mid_v3_v3v3(), min, negate_v3(), NULL, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, RV3D_ORTHO, RV3D_PERSP, size(), sub_v3_v3v3(), and VIEW3D_MARGIN.
Referenced by view3d_all_exec(), view3d_from_minmax_multi(), and viewselected_exec().
|
static |
Same as view3d_from_minmax but for all regions (except cameras).
Definition at line 726 of file view3d_navigate.c.
References blender::compositor::area(), C, CTX_wm_area(), ED_view3d_camera_lock_check(), max, min, ARegion::next, RegionView3D::persp, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_CAMOB, and view3d_from_minmax().
Referenced by view3d_all_exec(), and viewselected_exec().
Definition at line 60 of file view3d_navigate.c.
References C, RV3D_LOCK_LOCATION, and view3d_navigation_poll_impl().
Referenced by VIEW3D_OT_move(), VIEW3D_OT_view_center_cursor(), VIEW3D_OT_view_center_pick(), and VIEW3D_OT_view_pan().
Definition at line 50 of file view3d_navigate.c.
References C, CTX_wm_region_view3d(), ED_operator_region_view3d_active(), and RV3D_LOCK_FLAGS.
Referenced by view3d_location_poll(), view3d_rotation_poll(), and view3d_zoom_or_dolly_poll().
|
static |
Definition at line 617 of file view3d_navigate.c.
References BKE_object_minmax(), BKE_object_minmax_dupli(), depsgraph, max, min, minmax_v3v3_v3(), Object::obmat, and scene.
Referenced by view3d_all_exec(), and viewselected_exec().
|
static |
Definition at line 595 of file view3d_navigate.c.
References BKE_object_empty_image_frame_is_visible_in_view3d(), BLI_assert, View3D::camera, Object::empty_drawtype, Object::id, NULL, OB_EMPTY, OB_EMPTY_IMAGE, ID::orig_id, and Object::type.
Referenced by view3d_all_exec(), and viewselected_exec().
void view3d_operator_properties_common | ( | wmOperatorType * | ot, |
const enum eV3D_OpPropFlag | flag | ||
) |
Definition at line 81 of file view3d_navigate.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), wmOperatorType::srna, V3D_OP_PROP_DELTA, V3D_OP_PROP_MOUSE_CO, V3D_OP_PROP_USE_ALL_REGIONS, V3D_OP_PROP_USE_MOUSE_INIT, and WM_operator_properties_use_cursor_init().
Referenced by VIEW3D_OT_dolly(), VIEW3D_OT_move(), VIEW3D_OT_rotate(), VIEW3D_OT_view_all(), VIEW3D_OT_view_selected(), and VIEW3D_OT_zoom().
void view3d_orbit_apply_dyn_ofs | ( | float | r_ofs[3], |
const float | ofs_old[3], | ||
const float | viewquat_old[4], | ||
const float | viewquat_new[4], | ||
const float | dyn_ofs[3] | ||
) |
Definition at line 134 of file view3d_navigate.c.
References add_v3_v3(), invert_qt_normalized(), invert_qt_qt_normalized(), mul_qt_qtqt(), mul_qt_v3(), and sub_v3_v3v3().
Referenced by ED_view3d_smooth_view_ex(), view3d_smoothview_apply_ex(), viewroll_apply(), and viewrotate_apply_dyn_ofs().
Definition at line 160 of file view3d_navigate.c.
References add_v2_v2(), add_v3_v3(), BASE_SELECTED, Object_Runtime::bb, BKE_boundbox_calc_center_aabb(), BKE_object_pose_armature_get(), BKE_paint_stroke_get_average(), BOUNDBOX_DIRTY, C, calculateTransformCenter(), copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_view3d(), Object::data, DEG_get_evaluated_view_layer(), DEG_get_original_object(), depsgraph, Curve::editfont, FIRSTBASE, BoundBox::flag, Object::mode, mul_m4_v3(), mul_v2_fl(), mul_v3_fl(), Base::next, NULL, OB_FONT, OB_MODE_ALL_PAINT, OB_MODE_EDIT, OB_MODE_OBJECT, OB_MODE_SCULPT, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OBACT, Base::object, Object::obmat, Object::runtime, scene, EditFont::textcurs, Object::type, V3D_AROUND_CENTER_MEDIAN, and zero_v3().
Referenced by axis_set_view(), viewops_data_create(), vieworbit_exec(), and viewroll_exec().
void VIEW3D_OT_view_all | ( | wmOperatorType * | ot | ) |
Definition at line 830 of file view3d_navigate.c.
References wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, V3D_OP_PROP_USE_ALL_REGIONS, view3d_all_exec(), and view3d_operator_properties_common().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_axis | ( | wmOperatorType * | ot | ) |
Definition at line 1257 of file view3d_navigate.c.
References BLT_I18NCONTEXT_EDITOR_VIEW3D, wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_SKIP_SAVE, prop_view_items, RNA_def_boolean(), RNA_def_enum(), RNA_def_property_flag(), RNA_def_property_translation_context(), wmOperatorType::srna, and view_axis_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_camera | ( | wmOperatorType * | ot | ) |
Definition at line 1385 of file view3d_navigate.c.
References wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, and view_camera_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_center_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 1057 of file view3d_navigate.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, view3d_location_poll(), and viewcenter_cursor_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_center_pick | ( | wmOperatorType * | ot | ) |
Definition at line 1115 of file view3d_navigate.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, view3d_location_poll(), and viewcenter_pick_invoke().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_orbit | ( | wmOperatorType * | ot | ) |
Definition at line 1529 of file view3d_navigate.c.
References wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_SKIP_SAVE, prop_view_orbit_items, RNA_def_enum(), RNA_def_float(), RNA_def_property_flag(), wmOperatorType::srna, and vieworbit_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_pan | ( | wmOperatorType * | ot | ) |
Definition at line 1605 of file view3d_navigate.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, wmOperatorType::prop, prop_view_pan_items, RNA_def_enum(), wmOperatorType::srna, view3d_location_poll(), and viewpan_invoke().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_selected | ( | wmOperatorType * | ot | ) |
Definition at line 1003 of file view3d_navigate.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, V3D_OP_PROP_USE_ALL_REGIONS, view3d_operator_properties_common(), view3d_zoom_or_dolly_poll(), and viewselected_exec().
Referenced by view3d_operatortypes().
Definition at line 65 of file view3d_navigate.c.
References C, RV3D_LOCK_ROTATION, and view3d_navigation_poll_impl().
Referenced by VIEW3D_OT_dolly(), and VIEW3D_OT_rotate().
Definition at line 70 of file view3d_navigate.c.
References C, RV3D_LOCK_ZOOM_AND_DOLLY, and view3d_navigation_poll_impl().
Referenced by VIEW3D_OT_view_selected(), VIEW3D_OT_zoom(), and VIEW3D_OT_zoom_border().
|
static |
Definition at line 1146 of file view3d_navigate.c.
References angle_signed_qtqt(), axis_angle_to_quat(), axis_set_view(), BLI_assert, C, CTX_data_active_object(), CTX_data_edit_object(), CTX_data_view_layer(), ED_getTransformOrientationMatrix(), ED_view3d_context_user_region(), ED_view3d_quat_from_axis_view(), ED_view3d_smooth_view_force_finish(), ELEM, fabsf, invert_qt_normalized(), RegionView3D::lpersp, M_PI, M_PI_2, mat3_to_quat(), mul_qt_qtqt(), NULL, OPERATOR_FINISHED, RegionView3D::persp, wmOperator::ptr, ARegion::regiondata, RNA_boolean_get(), RNA_enum_get(), RV3D_CAMOB, RV3D_PERSP, RV3D_VIEW_AXIS_ROLL_0, RV3D_VIEW_AXIS_ROLL_270, RV3D_VIEW_BACK, RV3D_VIEW_BOTTOM, RV3D_VIEW_FRONT, RV3D_VIEW_LEFT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, unit_qt(), USER_TRACKBALL, V3D_AROUND_ACTIVE, RegionView3D::viewinv, RegionView3D::viewquat, and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_axis().
|
static |
Definition at line 1291 of file view3d_navigate.c.
References axis_set_view(), BKE_view_layer_camera_find(), C, Scene::camera, View3D::camera, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), RegionView3D::dist, ED_view3d_context_user_region(), ED_view3d_lastview_store(), ED_view3d_smooth_view(), ED_view3d_smooth_view_force_finish(), Scene::id, ID_RECALC_COPY_ON_WRITE, View3D::lens, RegionView3D::lpersp, RegionView3D::lview, RegionView3D::lview_axis_roll, RegionView3D::lviewquat, NULL, OB_CAMERA, OBACT, RegionView3D::ofs, OPERATOR_CANCELLED, OPERATOR_FINISHED, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, RV3D_LOCK_ANY_TRANSFORM, RV3D_LOCK_FLAGS, scene, View3D::scenelock, RegionView3D::smooth_timer, Object::type, RegionView3D::viewquat, and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_camera().
|
static |
Definition at line 1027 of file view3d_navigate.c.
References C, CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), Scene::cursor, ED_view3d_smooth_view(), ED_view3d_smooth_view_force_finish(), View3DCursor::location, wmOperatorType::name, negate_v3_v3(), OPERATOR_FINISHED, scene, wmOperator::type, and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_center_cursor().
|
static |
Definition at line 1078 of file view3d_navigate.c.
References C, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), depsgraph, ED_view3d_autodist(), ED_view3d_smooth_view(), ED_view3d_smooth_view_force_finish(), ED_view3d_win_to_3d_int(), wmEvent::mval, wmOperatorType::name, negate_v3(), negate_v3_v3(), NULL, RegionView3D::ofs, OPERATOR_FINISHED, wmOperator::type, view3d_operator_needs_opengl(), and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_center_pick().
void viewmove_apply | ( | ViewOpsData * | vod, |
int | x, | ||
int | y | ||
) |
Definition at line 553 of file view3d_navigate.c.
References ViewOpsData::area, ViewOpsData::depsgraph, ED_region_tag_redraw(), ED_view3d_camera_lock_check(), ED_view3d_camera_lock_sync(), ED_view3d_camera_view_pan(), ED_view3d_offset_lock_check(), ED_view3d_win_to_delta(), ViewOpsData::event_xy, ViewOpsData::init, RegionView3D::ofs, RegionView3D::ofs_lock, RegionView3D::persp, ViewOpsData::prev, ViewOpsData::region, ViewOpsData::rv3d, RV3D_BOXVIEW, RV3D_CAMOB, RV3D_LOCK_FLAGS, sub_v3_v3(), ViewOpsData::v3d, view3d_boxview_sync(), ARegion::winx, ARegion::winy, x, y, and ViewOpsData::zfac.
Referenced by viewmove_invoke(), viewmove_modal(), and viewpan_invoke().
ViewOpsData* viewops_data_create | ( | bContext * | C, |
const wmEvent * | event, | ||
enum eViewOpsFlag | viewops_flag | ||
) |
Definition at line 265 of file view3d_navigate.c.
References add_v2_v2v2_int(), ViewOpsData::area, BLI_rcti_cent_x(), BLI_rcti_cent_y(), ViewOpsData::bmain, C, calctrackballvec(), ViewOpsData::camzoom, RegionView3D::camzoom, closest_to_line_v3(), copy_m3_m4(), copy_qt_qt(), copy_v2_v2_int(), copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), ViewOpsData::curr, depsgraph, ViewOpsData::depsgraph, ViewOpsData::dist, RegionView3D::dist, ViewOpsData::dyn_ofs, ED_region_tag_redraw(), ED_view3d_autodist(), ED_view3d_calc_zfac(), ED_view3d_camera_lock_init(), ED_view3d_persp_ensure(), ED_view3d_win_to_3d(), ED_view3d_win_to_vector(), ViewOpsData::event_type, ViewOpsData::event_xy, ViewOpsData::event_xy_offset, ListBase::first, float(), ViewOpsData::init, RegionView3D::is_persp, len_v3v3(), MEM_callocN, ViewOpsData::mousevec, mul_m3_v3(), wmEvent::mval, negate_v3(), negate_v3_v3(), ViewOpsData::ofs, RegionView3D::ofs, RegionView3D::persmat, ViewOpsData::persp, RegionView3D::persp, ViewOpsData::prev, ViewOpsData::quat, ViewOpsData::region, ARegion::regiondata, ViewOpsData::reverse, RegionView3D::rflag, ViewOpsData::rv3d, RV3D_NAVIGATING, ViewOpsData::scene, ScrArea::spacedata, sub_v3_v3v3(), ViewOpsData::trackvec, ViewOpsData::use_dyn_ofs, ViewOpsData::v3d, view3d_operator_needs_opengl(), view3d_orbit_calc_center(), RegionView3D::viewinv, VIEWOPS_FLAG_DEPTH_NAVIGATE, VIEWOPS_FLAG_ORBIT_SELECT, VIEWOPS_FLAG_PERSP_ENSURE, VIEWOPS_FLAG_USE_MOUSE_INIT, ViewOpsData::viewquat, RegionView3D::viewquat, ARegion::winrct, ARegion::winx, ARegion::winy, wmEvent::xy, zero_v2_int(), and ViewOpsData::zfac.
Referenced by viewdolly_invoke(), viewmove_invoke(), viewpan_invoke(), viewroll_invoke(), viewrotate_invoke(), and viewzoom_invoke().
void viewops_data_free | ( | struct bContext * | C, |
ViewOpsData * | vod | ||
) |
Allocate and fill in context pointers for ViewOpsData
Definition at line 414 of file view3d_navigate.c.
References C, CTX_wm_manager(), CTX_wm_region(), ViewOpsData::dial, ED_region_tag_redraw(), ViewOpsData::init, MEM_freeN, ViewOpsData::region, RegionView3D::rflag, ViewOpsData::rv3d, RV3D_NAVIGATING, ViewOpsData::timer, wmTimer::win, and WM_event_remove_timer().
Referenced by viewdolly_cancel(), viewdolly_exec(), viewdolly_invoke(), viewdolly_modal(), viewmove_cancel(), viewmove_invoke(), viewmove_modal(), viewpan_invoke(), viewroll_cancel(), viewroll_exec(), viewroll_invoke(), viewroll_modal(), viewrotate_cancel(), viewrotate_invoke(), viewrotate_modal(), viewzoom_cancel(), viewzoom_exec(), viewzoom_invoke(), and viewzoom_modal().
|
static |
Definition at line 160 of file view3d_navigate.c.
enum eViewOpsFlag viewops_flag_from_prefs | ( | void | ) |
Definition at line 160 of file view3d_navigate.c.
Referenced by viewdolly_invoke(), viewmove_invoke(), viewpan_invoke(), viewroll_invoke(), viewrotate_invoke(), and viewzoom_invoke().
|
static |
Definition at line 1423 of file view3d_navigate.c.
References angle(), axis_angle_to_quat(), axis_angle_to_quat_single(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), CTX_wm_view3d(), DEG2RADF, depsgraph, ED_view3d_axis_view_opposite(), ED_view3d_camera_lock_check(), ED_view3d_camera_lock_init(), ED_view3d_context_user_region(), ED_view3d_persp_ensure(), ED_view3d_quat_from_axis_view(), ED_view3d_smooth_view(), ED_view3d_smooth_view_force_finish(), ELEM, fabsf, float(), M_PI, mul_qt_qtqt(), wmOperatorType::name, negate_v3(), normalize_qt(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, RegionView3D::persp, wmOperator::ptr, ARegion::regiondata, RNA_enum_get(), RNA_property_float_get(), RNA_property_is_set(), RNA_struct_find_property(), RV3D_CAMOB, RV3D_LOCK_FLAGS, RV3D_LOCK_ROTATION, RV3D_VIEW_USER, wmOperator::type, USER_ORBIT_SELECTION, V3D_VIEW_STEPDOWN, V3D_VIEW_STEPLEFT, V3D_VIEW_STEPRIGHT, RegionView3D::view, view3d_orbit_calc_center(), RegionView3D::view_axis_roll, RegionView3D::viewinv, RegionView3D::viewquat, and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_orbit().
|
static |
Definition at line 1576 of file view3d_navigate.c.
References C, ED_view3d_camera_lock_undo_push(), ViewOpsData::event_xy, wmOperatorType::name, OPERATOR_FINISHED, ViewOpsData::prev, wmOperator::ptr, RNA_enum_get(), ViewOpsData::rv3d, wmOperator::type, ViewOpsData::v3d, V3D_VIEW_PANDOWN, V3D_VIEW_PANLEFT, V3D_VIEW_PANRIGHT, V3D_VIEW_PANUP, viewmove_apply(), viewops_data_create(), viewops_data_free(), viewops_flag_from_prefs(), VIEWOPS_FLAG_ORBIT_SELECT, x, and y.
Referenced by VIEW3D_OT_view_pan().
void viewrotate_apply_dyn_ofs | ( | ViewOpsData * | vod, |
const float | viewquat_new[4] | ||
) |
Definition at line 151 of file view3d_navigate.c.
References ViewOpsData::dyn_ofs, ViewOpsData::init, ViewOpsData::ofs, RegionView3D::ofs, ViewOpsData::quat, ViewOpsData::rv3d, ViewOpsData::use_dyn_ofs, and view3d_orbit_apply_dyn_ofs().
Referenced by viewrotate_apply(), and viewrotate_apply_snap().
|
static |
Definition at line 857 of file view3d_navigate.c.
References blender::compositor::area(), BASE_SELECTED, BASE_SELECTED_EDITABLE, BKE_gpencil_stroke_minmax(), BKE_paint_select_face_test(), BKE_paint_stroke_get_average(), BKE_pose_minmax(), C, copy_v3_v3(), CTX_DATA_BEGIN, CTX_data_edit_object(), CTX_DATA_END, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_area(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), Object::data, DEG_get_evaluated_view_layer(), DEG_get_original_object(), depsgraph, ED_view3d_camera_lock_check(), ED_view3d_clipping_clamp_minmax(), ED_view3d_minmax_verts(), ED_view3d_smooth_view_undo_begin(), ED_view3d_smooth_view_undo_end(), BezTriple::f1, BezTriple::f2, BezTriple::f3, ListBase::first, FIRSTBASE, View3D::flag2, FOREACH_OBJECT_IN_MODE_BEGIN, FOREACH_OBJECT_IN_MODE_END, ARegion::gizmo_map, GP_STROKE_3DSPACE, GP_STROKE_SELECT, GPENCIL_ANY_MODE, INIT_MINMAX, max, min, minmax_v3v3_v3(), Object::mode, mul_m4_v3(), wmOperatorType::name, Base::next, NULL, OB_ARMATURE, OB_GPENCIL, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OBACT, Base::object, ViewLayer::object_bases, Object::obmat, OPERATOR_FINISHED, paintface_minmax(), PE_minmax(), wmOperator::ptr, ARegion::regiondata, RNA_boolean_get(), RV3D_CLIPPING_ENABLED, scene, SELECT, Object::type, wmOperator::type, V3D_LOCK_CAMERA, BezTriple::vec, view3d_from_minmax(), view3d_from_minmax_multi(), view3d_object_calc_minmax(), view3d_object_skip_minmax(), WM_gizmomap_is_any_selected(), WM_gizmomap_minmax(), and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_selected().
|
static |
Definition at line 1136 of file view3d_navigate.c.
Referenced by VIEW3D_OT_view_axis().
|
static |
Definition at line 1415 of file view3d_navigate.c.
Referenced by VIEW3D_OT_view_orbit().
|
static |
Definition at line 1568 of file view3d_navigate.c.
Referenced by VIEW3D_OT_view_pan().