Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_camera_types.h"
#include "DNA_lamp_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_camera.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_depsgraph.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "ED_particle.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_mesh.h"
#include "ED_view3d.h"
#include "PIL_time.h"
#include "view3d_intern.h"
Go to the source code of this file.
Definition in file view3d_edit.c.
#define COS45 0.70710678118654746 |
Definition at line 522 of file view3d_edit.c.
#define SIN45 COS45 |
Definition at line 523 of file view3d_edit.c.
#define TRACKBALLSIZE (1.1) |
Definition at line 373 of file view3d_edit.c.
Referenced by calctrackballvec(), and viewrotate_apply().
#define VIEW_MODAL_CONFIRM 1 |
Definition at line 577 of file view3d_edit.c.
Referenced by viewdolly_modal(), viewdolly_modal_keymap(), viewmove_modal(), viewmove_modal_keymap(), viewrotate_modal(), viewrotate_modal_keymap(), viewzoom_modal(), and viewzoom_modal_keymap().
#define VIEWROT_MODAL_AXIS_SNAP_DISABLE 3 |
Definition at line 579 of file view3d_edit.c.
Referenced by viewrotate_modal(), and viewrotate_modal_keymap().
#define VIEWROT_MODAL_AXIS_SNAP_ENABLE 2 |
Definition at line 578 of file view3d_edit.c.
Referenced by viewrotate_modal(), and viewrotate_modal_keymap().
#define VIEWROT_MODAL_SWITCH_MOVE 5 |
Definition at line 581 of file view3d_edit.c.
Referenced by viewdolly_modal(), viewdolly_modal_keymap(), viewrotate_modal(), viewrotate_modal_keymap(), viewzoom_modal(), and viewzoom_modal_keymap().
#define VIEWROT_MODAL_SWITCH_ROTATE 6 |
Definition at line 582 of file view3d_edit.c.
Referenced by viewdolly_modal(), viewdolly_modal_keymap(), viewmove_modal(), viewmove_modal_keymap(), viewzoom_modal(), and viewzoom_modal_keymap().
#define VIEWROT_MODAL_SWITCH_ZOOM 4 |
Definition at line 580 of file view3d_edit.c.
Referenced by viewmove_modal(), viewmove_modal_keymap(), viewrotate_modal(), and viewrotate_modal_keymap().
typedef struct ViewOpsData ViewOpsData |
anonymous enum |
Definition at line 570 of file view3d_edit.c.
static void axis_set_view | ( | bContext * | C, |
View3D * | v3d, | ||
ARegion * | ar, | ||
float | q1, | ||
float | q2, | ||
float | q3, | ||
float | q4, | ||
short | view, | ||
int | perspo, | ||
int | align_active | ||
) | [static] |
Definition at line 2611 of file view3d_edit.c.
References View3D::camera, CTX_data_active_object(), ED_getTransformOrientationMatrix(), ED_region_tag_redraw(), FALSE, invert_qt(), mat3_to_quat(), mul_qt_qtqt(), normalize_qt(), NULL, RegionView3D::ofs, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, RV3D_ORTHO, RV3D_PERSP, RV3D_VIEW_BACK, RV3D_VIEW_BOTTOM, RV3D_VIEW_FRONT, RV3D_VIEW_LEFT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, RV3D_VIEW_USER, smooth_view(), U, UserDef::uiflag, USER_AUTOPERSP, RegionView3D::view, and RegionView3D::viewlock.
Referenced by viewnumpad_exec().
Definition at line 2983 of file view3d_edit.c.
References CTX_wm_view3d(), and ED_view3D_background_image_new().
Referenced by background_image_add_exec(), and background_image_add_invoke().
static int background_image_add_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2990 of file view3d_edit.c.
References background_image_add(), and OPERATOR_FINISHED.
Referenced by VIEW3D_OT_background_image_add().
static int background_image_add_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 2997 of file view3d_edit.c.
References background_image_add(), BKE_add_image_file(), CTX_wm_view3d(), FILE_MAX, find_id(), View3D::flag, Image::id, id_lib_extern(), id_us_plus(), BGpic::ima, MAX_ID_NAME, NC_SPACE, ND_SPACE_VIEW3D, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get(), RNA_struct_property_is_set(), ID::us, V3D_DISPBGPICS, and WM_event_add_notifier().
Referenced by VIEW3D_OT_background_image_add().
static int background_image_remove_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3055 of file view3d_edit.c.
References View3D::bgpicbase, BLI_findlink(), CTX_wm_view3d(), ED_view3D_background_image_remove(), NC_SPACE, ND_SPACE_VIEW3D, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), and WM_event_add_notifier().
Referenced by VIEW3D_OT_background_image_remove().
static void calc_clipping_plane | ( | float | clip[6][4], |
BoundBox * | clipbb | ||
) | [static] |
Definition at line 3091 of file view3d_edit.c.
References normal_tri_v3(), simple_enum_gen::val, and BoundBox::vec.
Referenced by calc_local_clipping().
static void calc_local_clipping | ( | float | clip_local[][4], |
BoundBox * | clipbb, | ||
float | mat[][4] | ||
) | [static] |
Definition at line 3106 of file view3d_edit.c.
References calc_clipping_plane(), i, invert_m4_m4(), mul_v3_m4v3(), and BoundBox::vec.
Referenced by ED_view3d_local_clipping().
static void calctrackballvec | ( | rcti * | rect, |
int | mx, | ||
int | my, | ||
float * | vec | ||
) | [static] |
Definition at line 375 of file view3d_edit.c.
References simple_enum_gen::d, M_SQRT1_2, M_SQRT2, sqrt(), TRACKBALLSIZE, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by viewops_data_create(), and viewrotate_apply().
static int depth_segment_cb | ( | int | x, |
int | y, | ||
void * | userData | ||
) | [static] |
Definition at line 3466 of file view3d_edit.c.
References data, FLT_MAX, and view_autodist_depth_margin().
Referenced by ED_view3d_autodist_depth_seg().
int ED_view3d_autodist | ( | Scene * | scene, |
ARegion * | ar, | ||
View3D * | v3d, | ||
const int | mval[2], | ||
float | mouse_worldloc[3] | ||
) |
Definition at line 3388 of file view3d_edit.c.
References bgl_get_mats(), draw_depth(), FLT_MAX, bglMats::modelview, NULL, p, bglMats::projection, view_autodist_depth_margin(), and bglMats::viewport.
Referenced by set_3dcursor_invoke(), set_clone_cursor_invoke(), and viewops_data_create().
int ED_view3d_autodist_depth | ( | struct ARegion * | ar, |
const int | mval[2], | ||
int | margin, | ||
float * | depth | ||
) |
Definition at line 3459 of file view3d_edit.c.
References FLT_MAX, and view_autodist_depth_margin().
Referenced by gp_stroke_newfrombuffer().
int ED_view3d_autodist_depth_seg | ( | struct ARegion * | ar, |
const int | mval_sta[2], | ||
const int | mval_end[2], | ||
int | margin, | ||
float * | depth | ||
) |
Definition at line 3486 of file view3d_edit.c.
References copy_v2_v2_int(), data, depth_segment_cb(), FLT_MAX, NULL, and plot_line_v2v2i().
Referenced by gp_stroke_newfrombuffer().
Definition at line 3415 of file view3d_edit.c.
References draw_depth(), draw_depth_gpencil(), and NULL.
Referenced by gp_paint_strokeend(), and gp_stroke_addpoint().
int ED_view3d_autodist_simple | ( | ARegion * | ar, |
const int | mval[2], | ||
float | mouse_worldloc[3], | ||
int | margin, | ||
float * | force_depth | ||
) |
Definition at line 3431 of file view3d_edit.c.
References bgl_get_mats(), FLT_MAX, bglMats::modelview, p, bglMats::projection, view_autodist_depth_margin(), and bglMats::viewport.
Referenced by gp_stroke_convertcoords().
void ED_view3D_background_image_clear | ( | View3D * | v3d | ) |
Definition at line 3602 of file view3d_edit.c.
References View3D::bgpicbase, ED_view3D_background_image_remove(), ListBase::first, and BGpic::next.
Definition at line 3573 of file view3d_edit.c.
References View3D::bgpicbase, BGpic::blend, BLI_addtail(), ImageUser::fie_ima, BGpic::flag, BGpic::iuser, MEM_callocN(), ImageUser::ok, BGpic::size, V3D_BGPIC_EXPANDED, and BGpic::view.
Referenced by background_image_add().
Definition at line 3589 of file view3d_edit.c.
References View3D::bgpicbase, BLI_remlink(), BGpic::clip, MovieClip::id, Image::id, id_us_min(), BGpic::ima, and MEM_freeN().
Referenced by background_image_remove_exec(), and ED_view3D_background_image_clear().
int ED_view3d_camera_lock_check | ( | View3D * | v3d, |
RegionView3D * | rv3d | ||
) |
Definition at line 84 of file view3d_edit.c.
References View3D::camera, View3D::flag2, Object::id, ID::lib, NULL, RegionView3D::persp, RV3D_CAMOB, and V3D_LOCK_CAMERA.
Referenced by ED_view3d_camera_lock_init(), ED_view3d_camera_lock_sync(), view3d_all_exec(), view3d_zoom_border_invoke(), viewdolly_poll(), viewmove_apply(), vieworbit_exec(), viewrotate_invoke(), viewselected_exec(), and viewzoom_exec().
void ED_view3d_camera_lock_init | ( | View3D * | v3d, |
RegionView3D * | rv3d | ||
) |
Definition at line 92 of file view3d_edit.c.
References View3D::camera, RegionView3D::dist, ED_view3d_camera_lock_check(), ED_view3d_from_object(), NULL, RegionView3D::ofs, and RegionView3D::viewquat.
Referenced by ndof_orbit_invoke(), ndof_pan_invoke(), smooth_view(), and viewops_data_create().
int ED_view3d_camera_lock_sync | ( | View3D * | v3d, |
RegionView3D * | rv3d | ||
) |
Definition at line 100 of file view3d_edit.c.
References View3D::camera, DAG_id_tag_update(), RegionView3D::dist, ED_view3d_camera_lock_check(), ED_view3d_to_m4(), ED_view3d_to_object(), FALSE, Object::id, Object::imat, invert_m4_m4(), mult_m4_m4m4(), NC_OBJECT, ND_TRANSFORM, OB_RECALC_OB, object_apply_mat4(), object_tfm_protected_backup(), object_tfm_protected_restore(), Object::obmat, RegionView3D::ofs, Object::parent, Object::protectflag, TRUE, U, UserDef::uiflag, USER_CAM_LOCK_NO_PARENT, RegionView3D::viewquat, and WM_main_add_notifier().
Referenced by ndof_orbit_invoke(), ndof_pan_invoke(), view3d_smoothview_invoke(), viewdolly_apply(), viewmove_apply(), viewrotate_apply(), viewzoom_apply(), and viewzoom_exec().
void ED_view3d_from_m4 | ( | float | mat[][4], |
float | ofs[3], | ||
float | quat[4], | ||
float * | dist | ||
) |
Set the view transformation from a 4x4 matrix.
mat | The view 4x4 transformation matrix to assign. |
ofs | The view offset, normally from RegionView3D.ofs. |
quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 3511 of file view3d_edit.c.
References copy_m3_m4(), invert_m4_m4(), mat4_to_quat(), mul_m3_v3(), negate_v3_v3(), normalize_m3(), and sub_v3_v3().
Referenced by ED_view3d_from_object().
void ED_view3d_from_object | ( | struct Object * | ob, |
float | ofs[3], | ||
float | quat[4], | ||
float * | dist, | ||
float * | lens | ||
) |
Set the RegionView3D members from an objects transformation and optionally lens.
ob | The object to set the view to. |
ofs | The view offset to be set, normally from RegionView3D.ofs. |
quat | The view rotation to be set, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs to be set, normally from RegionView3D.dist. |
lens | The view lens angle set for cameras and lamps, normally from View3D.lens. |
Definition at line 3552 of file view3d_edit.c.
References camera_params_from_object(), camera_params_init(), ED_view3d_from_m4(), CameraParams::lens, and Object::obmat.
Referenced by ED_view3d_camera_lock_init(), obmat_to_viewmat(), smooth_view(), view3d_align_axis_to_vector(), and viewrotate_invoke().
void ED_view3d_local_clipping | ( | RegionView3D * | rv3d, |
float | mat[][4] | ||
) |
Definition at line 3121 of file view3d_edit.c.
References calc_local_clipping(), RegionView3D::clip_local, RegionView3D::clipbb, RegionView3D::rflag, and RV3D_CLIPPING.
Referenced by ED_view3d_init_mats_rv3d(), findnearestedge__doClosest(), lattice_foreachScreenVert(), mesh_foreachScreenEdge(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), nurbs_foreachScreenVert(), and project_paint_begin().
Definition at line 304 of file view3d_edit.c.
References ARegion::alignment, ED_area_tag_redraw(), ListBase::last, NULL, ARegion::prev, ScrArea::regionbase, ARegion::regiondata, RegionView3D::rflag, RGN_ALIGN_QSPLIT, RV3D_BOXCLIP, RV3D_BOXVIEW, RV3D_LOCKED, TRUE, view3d_boxview_copy(), and RegionView3D::viewlock.
void ED_view3d_to_m4 | ( | float | mat[][4], |
const float | ofs[3], | ||
const float | quat[4], | ||
const float | dist | ||
) |
Calculate the view transformation matrix from RegionView3D input. The resulting matrix is equivilent to RegionView3D.viewinv
mat | The view 4x4 transformation matrix to calculate. |
ofs | The view offset, normally from RegionView3D.ofs. |
quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 3540 of file view3d_edit.c.
References mul_mat3_m4_v3(), quat_to_mat4(), and sub_v3_v3v3().
Referenced by ED_view3d_camera_lock_sync(), ED_view3d_to_object(), and move_camera().
void ED_view3d_to_object | ( | struct Object * | ob, |
const float | ofs[3], | ||
const float | quat[4], | ||
const float | dist | ||
) |
Set the object transformation from RegionView3D members.
ob | The object which has the transformation assigned. |
ofs | The view offset, normally from RegionView3D.ofs. |
quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 3566 of file view3d_edit.c.
References ED_view3d_to_m4(), object_apply_mat4(), and TRUE.
Referenced by ED_view3d_camera_lock_sync(), and view3d_camera_to_view_exec().
static int enable_manipulator_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 3322 of file view3d_edit.c.
References CTX_wm_view3d(), NC_SPACE, ND_SPACE_VIEW3D, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), View3D::twtype, V3D_MANIP_ROTATE, V3D_MANIP_SCALE, V3D_MANIP_TRANSLATE, and WM_event_add_notifier().
Referenced by VIEW3D_OT_enable_manipulator().
static int manipulator_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 3286 of file view3d_edit.c.
References BIF_do_manipulator(), CTX_wm_view3d(), wmEvent::keymodifier, KM_SHIFT, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, View3D::twflag, V3D_DRAW_MANIPULATOR, V3D_USE_MANIPULATOR, and view3d_operator_needs_opengl().
Referenced by VIEW3D_OT_manipulator().
static int ndof_orbit_invoke | ( | bContext * | C, |
wmOperator * | UNUSEDop, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 985 of file view3d_edit.c.
References angle(), axis_angle_to_quat(), copy_v3_v3(), cos(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), wmEvent::customdata, RegionView3D::dist, wmNDOFMotionData::dt, ED_region_tag_redraw(), ED_view3d_camera_lock_init(), ED_view3d_camera_lock_sync(), UserDef::flag, invert_qt_qt(), is_zero_v3(), mul_qt_qtqt(), mul_qt_v3(), mul_v3_fl(), mul_v3_v3fl(), UserDef::ndof_flag, NDOF_MOTION, NDOF_ROLL_INVERT_AXIS, NDOF_ROTATE_INVERT_AXIS, NDOF_TILT_INVERT_AXIS, ndof_to_axis_angle(), NDOF_ZOOM_INVERT, RegionView3D::ofs, OPERATOR_CANCELLED, OPERATOR_FINISHED, P_FINISHING, wmNDOFMotionData::progress, rot, RegionView3D::rot_angle, RegionView3D::rot_axis, RV3D_LOCKED, RV3D_VIEW_USER, wmNDOFMotionData::rvec, wmNDOFMotionData::rx, wmNDOFMotionData::ry, wmNDOFMotionData::rz, sin(), sub_v3_v3(), wmNDOFMotionData::tvec, wmNDOFMotionData::tx, wmNDOFMotionData::ty, wmEvent::type, wmNDOFMotionData::tz, U, USER_TRACKBALL, RegionView3D::view, RegionView3D::viewlock, and RegionView3D::viewquat.
Referenced by VIEW3D_OT_ndof_orbit().
static int ndof_pan_invoke | ( | bContext * | C, |
wmOperator * | UNUSEDop, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1136 of file view3d_edit.c.
References CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), wmEvent::customdata, RegionView3D::dist, wmNDOFMotionData::dt, ED_region_tag_redraw(), ED_view3d_camera_lock_init(), ED_view3d_camera_lock_sync(), invert_qt_qt(), mul_qt_v3(), mul_v3_fl(), UserDef::ndof_flag, NDOF_MOTION, NDOF_PANX_INVERT_AXIS, NDOF_PANY_INVERT_AXIS, NDOF_PANZ_INVERT_AXIS, RegionView3D::ofs, OPERATOR_CANCELLED, OPERATOR_FINISHED, P_FINISHING, wmNDOFMotionData::progress, RegionView3D::rot_angle, sub_v3_v3(), wmNDOFMotionData::tvec, wmNDOFMotionData::tx, wmNDOFMotionData::ty, wmEvent::type, wmNDOFMotionData::tz, U, and RegionView3D::viewquat.
Referenced by VIEW3D_OT_ndof_pan().
float ndof_to_axis_angle | ( | struct wmNDOFMotionData * | ndof, |
float | axis[3] | ||
) |
Definition at line 967 of file view3d_edit.c.
References wmNDOFMotionData::dt, normalize_v3_v3(), and wmNDOFMotionData::rvec.
Referenced by flyApply_ndof(), ndof_orbit_invoke(), and ndof_to_quat().
void ndof_to_quat | ( | struct wmNDOFMotionData * | ndof, |
float | q[4] | ||
) |
Definition at line 972 of file view3d_edit.c.
References angle(), axis_angle_to_quat(), and ndof_to_axis_angle().
static int render_border_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2321 of file view3d_edit.c.
References RenderData::border, CLAMP(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), ED_view3d_calc_camera_border(), ED_view3d_context_rv3d(), FALSE, RenderData::mode, NC_SCENE, ND_RENDER_OPTIONS, NULL, OPERATOR_FINISHED, wmOperator::ptr, Scene::r, R_BORDER, RNA_int_get(), WM_event_add_notifier(), rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by VIEW3D_OT_render_border().
static int set_3dcursor_invoke | ( | bContext * | C, |
wmOperator * | UNUSEDop, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 3199 of file view3d_edit.c.
References copy_v3_v3(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), ED_view3d_autodist(), ED_view3d_win_to_delta(), give_cursor(), initgrabz(), IS_CLIPPED, View3D::localvd, wmEvent::mval, NA_EDITED, NC_SCENE, NC_SPACE, ND_SPACE_VIEW3D, negate_v3_v3(), NULL, RegionView3D::ofs, OPERATOR_FINISHED, RegionView3D::persinv, RegionView3D::persmat, project_int_noclip(), sub_v3_v3(), U, UserDef::uiflag, USER_ORBIT_ZBUF, VECSUB2D, view3d_operator_needs_opengl(), ARegion::winx, ARegion::winy, WM_event_add_notifier(), and RegionView3D::zfac.
Referenced by VIEW3D_OT_cursor3d().
static int view3d_all_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1992 of file view3d_edit.c.
References Scene::base, BASE_VISIBLE, View3D::camera, CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), ED_region_tag_redraw(), ED_view3d_camera_lock_check(), ListBase::first, give_cursor(), INIT_MINMAX, max, MAX3(), min, minmax_object(), NC_SPACE, ND_SPACE_VIEW3D, Base::next, NULL, Base::object, OPERATOR_FINISHED, RegionView3D::persp, wmOperator::ptr, RNA_boolean_get(), RV3D_CAMOB, RV3D_PERSP, size(), smooth_view(), sub_v3_v3v3(), ARegion::winx, ARegion::winy, WM_event_add_notifier(), and zero_v3().
Referenced by VIEW3D_OT_view_all().
static void view3d_boxview_clip | ( | ScrArea * | sa | ) | [static] |
Definition at line 153 of file view3d_edit.c.
References RegionView3D::clip, RegionView3D::clipbb, copy_v2_v2(), RegionView3D::dist, ELEM, ELEM4, ListBase::first, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), ARegion::next, normal_tri_v3(), RegionView3D::ofs, ScrArea::regionbase, ARegion::regiondata, ARegion::regiontype, RegionView3D::rflag, RGN_TYPE_WINDOW, RV3D_BOXCLIP, RV3D_CLIPPING, RV3D_VIEW_BACK, RV3D_VIEW_BOTTOM, RV3D_VIEW_FRONT, RV3D_VIEW_TOP, simple_enum_gen::val, BoundBox::vec, RegionView3D::view, RegionView3D::viewlock, ARegion::winx, and ARegion::winy.
Referenced by view3d_boxview_copy(), and view3d_boxview_sync().
Definition at line 278 of file view3d_edit.c.
References copy_v3_v3(), RegionView3D::dist, ED_region_tag_redraw(), ListBase::first, ARegion::next, RegionView3D::ofs, ScrArea::regionbase, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_BOXCLIP, view3d_boxview_clip(), and RegionView3D::viewlock.
Referenced by do_view3d_region_buttons(), ED_view3d_quadview_update(), smooth_view(), and view3d_smoothview_invoke().
Definition at line 233 of file view3d_edit.c.
References RegionView3D::dist, ED_region_tag_redraw(), ELEM, ListBase::first, ARegion::next, RegionView3D::ofs, ScrArea::regionbase, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_BOXCLIP, RV3D_VIEW_BACK, RV3D_VIEW_BOTTOM, RV3D_VIEW_FRONT, RV3D_VIEW_LEFT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, RegionView3D::view, view3d_boxview_clip(), and RegionView3D::viewlock.
Referenced by view3d_zoom_border_exec(), viewdolly_apply(), viewdolly_exec(), viewmove_apply(), viewpan_exec(), viewzoom_apply(), and viewzoom_exec().
static int view3d_camera_active_poll | ( | bContext * | C | ) | [static] |
Definition at line 912 of file view3d_edit.c.
References CTX_wm_region_view3d(), ED_operator_view3d_active(), RegionView3D::persp, and RV3D_CAMOB.
Referenced by VIEW3D_OT_render_border().
static int view3d_camera_user_poll | ( | bContext * | C | ) | [static] |
Definition at line 925 of file view3d_edit.c.
References ED_view3d_context_user_region(), RegionView3D::persp, ARegion::regiondata, and RV3D_CAMOB.
Referenced by VIEW3D_OT_view_center_camera(), and VIEW3D_OT_zoom_camera_1_to_1().
static int view3d_center_camera_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2274 of file view3d_edit.c.
References BKE_screen_view3d_zoom_from_fac(), RegionView3D::camdx, RegionView3D::camdy, RegionView3D::camzoom, CLAMP(), CTX_data_scene(), CTX_wm_view3d(), ED_view3d_calc_camera_border_size(), ED_view3d_context_user_region(), MIN2, NC_SPACE, ND_SPACE_VIEW3D, OPERATOR_FINISHED, ARegion::regiondata, RV3D_CAMZOOM_MAX, RV3D_CAMZOOM_MIN, size(), ARegion::winx, ARegion::winy, and WM_event_add_notifier().
Referenced by VIEW3D_OT_view_center_camera().
static int view3d_clipping_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3127 of file view3d_edit.c.
References ViewContext::ar, RegionView3D::clip, RegionView3D::clipbb, CTX_wm_region_view3d(), ED_view3d_calc_clipping(), MEM_callocN(), NULL, OPERATOR_FINISHED, wmOperator::ptr, RegionView3D::rflag, RNA_int_get(), ViewContext::rv3d, RV3D_CLIPPING, view3d_get_transformation(), view3d_operator_needs_opengl(), view3d_set_viewcontext(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by VIEW3D_OT_clip_border().
static int view3d_clipping_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 3152 of file view3d_edit.c.
References RegionView3D::clipbb, CTX_wm_region(), CTX_wm_region_view3d(), ED_region_tag_redraw(), MEM_freeN(), NULL, OPERATOR_FINISHED, RegionView3D::rflag, RV3D_CLIPPING, and WM_border_select_invoke().
Referenced by VIEW3D_OT_clip_border().
void VIEW3D_OT_background_image_add | ( | wmOperatorType * | ot | ) |
Definition at line 3033 of file view3d_edit.c.
References background_image_add_exec(), background_image_add_invoke(), wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::exec, FILE_MAX, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MAX_ID_NAME, wmOperatorType::name, wmOperatorType::poll, RNA_def_string(), and wmOperatorType::srna.
Referenced by view3d_operatortypes().
void VIEW3D_OT_background_image_remove | ( | wmOperatorType * | ot | ) |
Definition at line 3072 of file view3d_edit.c.
References background_image_remove_exec(), wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_int(), and wmOperatorType::srna.
Referenced by view3d_operatortypes().
void VIEW3D_OT_clip_border | ( | wmOperatorType * | ot | ) |
Definition at line 3170 of file view3d_edit.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, view3d_clipping_exec(), view3d_clipping_invoke(), WM_border_select_cancel(), and WM_border_select_modal().
Referenced by view3d_operatortypes().
void VIEW3D_OT_cursor3d | ( | wmOperatorType * | ot | ) |
Definition at line 3263 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, and set_3dcursor_invoke().
Referenced by view3d_operatortypes().
void VIEW3D_OT_dolly | ( | wmOperatorType * | ot | ) |
Definition at line 1968 of file view3d_edit.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_POINTER, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, viewdolly_cancel(), viewdolly_exec(), viewdolly_invoke(), viewdolly_modal(), and viewdolly_poll().
Referenced by view3d_operatortypes().
void VIEW3D_OT_enable_manipulator | ( | wmOperatorType * | ot | ) |
Definition at line 3340 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_view3d_active(), enable_manipulator_invoke(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by view3d_operatortypes().
void VIEW3D_OT_manipulator | ( | wmOperatorType * | ot | ) |
Definition at line 3305 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::idname, wmOperatorType::invoke, manipulator_invoke(), wmOperatorType::name, P_CONSTRAINT, wmOperatorType::poll, and Transform_Properties().
Referenced by view3d_operatortypes().
void VIEW3D_OT_move | ( | wmOperatorType * | ot | ) |
Definition at line 1372 of file view3d_edit.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_POINTER, wmOperatorType::poll, viewmove_cancel(), viewmove_invoke(), and viewmove_modal().
Referenced by view3d_operatortypes().
void VIEW3D_OT_ndof_orbit | ( | struct wmOperatorType * | ot | ) |
Definition at line 1118 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ndof_orbit_invoke(), and wmOperatorType::poll.
Referenced by view3d_operatortypes().
void VIEW3D_OT_ndof_pan | ( | struct wmOperatorType * | ot | ) |
Definition at line 1213 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ndof_pan_invoke(), and wmOperatorType::poll.
Referenced by view3d_operatortypes().
void VIEW3D_OT_render_border | ( | wmOperatorType * | ot | ) |
Definition at line 2369 of file view3d_edit.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, render_border_exec(), RNA_def_int(), wmOperatorType::srna, view3d_camera_active_poll(), WM_border_select_cancel(), WM_border_select_invoke(), and WM_border_select_modal().
Referenced by view3d_operatortypes().
void VIEW3D_OT_rotate | ( | wmOperatorType * | ot | ) |
Definition at line 947 of file view3d_edit.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_POINTER, wmOperatorType::poll, viewrotate_cancel(), viewrotate_invoke(), and viewrotate_modal().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_all | ( | wmOperatorType * | ot | ) |
Definition at line 2077 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and view3d_all_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_center_camera | ( | wmOperatorType * | ot | ) |
Definition at line 2304 of file view3d_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, view3d_camera_user_poll(), and view3d_center_camera_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_center_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 2259 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, and viewcenter_cursor_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_orbit | ( | wmOperatorType * | ot | ) |
Definition at line 2880 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and vieworbit_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_pan | ( | wmOperatorType * | ot | ) |
Definition at line 2928 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and viewpan_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_persportho | ( | wmOperatorType * | ot | ) |
Definition at line 2965 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, and viewpersportho_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_view_selected | ( | wmOperatorType * | ot | ) |
Definition at line 2223 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, and viewselected_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_viewnumpad | ( | wmOperatorType * | ot | ) |
Definition at line 2807 of file view3d_edit.c.
References wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum(), wmOperatorType::srna, and viewnumpad_exec().
Referenced by view3d_operatortypes().
void VIEW3D_OT_zoom | ( | wmOperatorType * | ot | ) |
Definition at line 1735 of file view3d_edit.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_POINTER, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, viewzoom_cancel(), viewzoom_exec(), viewzoom_invoke(), and viewzoom_modal().
Referenced by view3d_operatortypes().
void VIEW3D_OT_zoom_border | ( | wmOperatorType * | ot | ) |
Definition at line 2525 of file view3d_edit.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_region_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, view3d_zoom_border_exec(), view3d_zoom_border_invoke(), WM_border_select_cancel(), and WM_border_select_modal().
Referenced by view3d_operatortypes().
void VIEW3D_OT_zoom_camera_1_to_1 | ( | wmOperatorType * | ot | ) |
Definition at line 2581 of file view3d_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, view3d_camera_user_poll(), and view3d_zoom_1_to_1_camera_exec().
Referenced by view3d_operatortypes().
Definition at line 2552 of file view3d_edit.c.
References BKE_screen_view3d_zoom_from_fac(), RegionView3D::camzoom, CLAMP(), ED_view3d_calc_camera_border_size(), Scene::r, ARegion::regiondata, RV3D_CAMZOOM_MAX, RV3D_CAMZOOM_MIN, RenderData::size, size(), and RenderData::xsch.
Referenced by view3d_zoom_1_to_1_camera_exec().
static int view3d_zoom_1_to_1_camera_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2564 of file view3d_edit.c.
References CTX_data_scene(), ED_view3d_context_user_region(), NC_SPACE, ND_SPACE_VIEW3D, OPERATOR_FINISHED, view3d_set_1_to_1_viewborder(), and WM_event_add_notifier().
Referenced by VIEW3D_OT_zoom_camera_1_to_1().
static int view3d_zoom_border_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2396 of file view3d_edit.c.
References bgl_get_mats(), BKE_report(), copy_v3_v3(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), ViewDepths::depths, RegionView3D::dist, draw_depth(), ED_view3d_win_to_delta(), FLT_MAX, View3D::grid, initgrabz(), RegionView3D::is_persp, len_v3(), MEM_freeN(), bglMats::modelview, View3D::near, NULL, RegionView3D::ofs, OPERATOR_CANCELLED, OPERATOR_FINISHED, p, bglMats::projection, wmOperator::ptr, wmOperator::reports, RNA_int_get(), RPT_ERROR, RV3D_BOXVIEW, smooth_view(), sub_v3_v3(), view3d_boxview_sync(), view3d_depth_near(), view3d_operator_needs_opengl(), view3d_update_depths_rect(), RegionView3D::viewlock, bglMats::viewport, ARegion::winx, ARegion::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by VIEW3D_OT_zoom_border().
static int view3d_zoom_border_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2513 of file view3d_edit.c.
References CTX_wm_region_view3d(), CTX_wm_view3d(), ED_view3d_camera_lock_check(), OPERATOR_PASS_THROUGH, RegionView3D::persp, RV3D_CAMOB, and WM_border_select_invoke().
Referenced by VIEW3D_OT_zoom_border().
static float view_autodist_depth_margin | ( | ARegion * | ar, |
const int | mval[2], | ||
int | margin | ||
) | [static] |
Definition at line 3360 of file view3d_edit.c.
References ViewDepths::depths, MEM_freeN(), view3d_depth_near(), view3d_update_depths_rect(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by depth_segment_cb(), ED_view3d_autodist(), ED_view3d_autodist_depth(), and ED_view3d_autodist_simple().
static void view_dolly_mouseloc | ( | ARegion * | ar, |
float | orig_ofs[3], | ||
float | dvec[3], | ||
float | dfac | ||
) | [static] |
Definition at line 1759 of file view3d_edit.c.
References madd_v3_v3v3fl(), RegionView3D::ofs, and ARegion::regiondata.
Referenced by viewdolly_apply(), and viewdolly_exec().
static void view_zoom_mouseloc | ( | ARegion * | ar, |
float | dfac, | ||
int | mx, | ||
int | my | ||
) | [static] |
Definition at line 1425 of file view3d_edit.c.
References add_v3_v3v3(), copy_v3_v3(), RegionView3D::dist, ED_view3d_win_to_delta(), initgrabz(), madd_v3_v3v3fl(), negate_v3(), negate_v3_v3(), RegionView3D::ofs, ARegion::regiondata, U, UserDef::uiflag, USER_ZOOM_TO_MOUSEPOS, ARegion::winrct, ARegion::winx, ARegion::winy, rcti::xmin, and rcti::ymin.
Referenced by viewzoom_apply(), and viewzoom_exec().
static int viewcenter_cursor_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2239 of file view3d_edit.c.
References CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), give_cursor(), negate_v3_v3(), NULL, OPERATOR_FINISHED, and smooth_view().
Referenced by VIEW3D_OT_view_center_cursor().
static void viewdolly_apply | ( | ViewOpsData * | vod, |
int | x, | ||
int | y, | ||
const short | zoom_invert | ||
) | [static] |
Definition at line 1765 of file view3d_edit.c.
References ViewOpsData::ar, RegionView3D::dist, ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), ViewOpsData::mousevec, ViewOpsData::ofs, ViewOpsData::origx, ViewOpsData::origy, ViewOpsData::rv3d, RV3D_BOXVIEW, ViewOpsData::sa, SWAP, U, UserDef::uiflag, USER_ZOOM_HORIZ, ViewOpsData::v3d, view3d_boxview_sync(), view_dolly_mouseloc(), RegionView3D::viewlock, ARegion::winrct, rcti::xmax, and rcti::ymax.
Referenced by viewdolly_invoke(), and viewdolly_modal().
static int viewdolly_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1961 of file view3d_edit.c.
References OPERATOR_CANCELLED, and viewops_data_free().
Referenced by VIEW3D_OT_dolly().
static int viewdolly_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1839 of file view3d_edit.c.
References ViewOpsData::ar, copy_v3_v3(), CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), ED_view3d_depth_tag_update(), ViewOpsData::mousevec, negate_v3_v3(), normalize_v3(), normalize_v3_v3(), RegionView3D::ofs, OPERATOR_FINISHED, wmOperator::ptr, ARegion::regiondata, RNA_int_get(), RV3D_BOXVIEW, ViewOpsData::sa, U, UserDef::uiflag, USER_ZOOM_TO_MOUSEPOS, view3d_boxview_sync(), view_dolly_mouseloc(), RegionView3D::viewinv, RegionView3D::viewlock, and viewops_data_free().
Referenced by VIEW3D_OT_dolly(), and viewdolly_invoke().
static int viewdolly_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1890 of file view3d_edit.c.
References wmOperator::customdata, ED_view3d_depth_tag_update(), FALSE, ViewOpsData::mousevec, MOUSEZOOM, negate_v3_v3(), normalize_v3(), ViewOpsData::oldx, ViewOpsData::oldy, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::origx, ViewOpsData::origy, wmEvent::prevx, wmEvent::prevy, wmOperator::ptr, RNA_int_set(), RNA_struct_property_is_set(), ViewOpsData::rv3d, wmEvent::type, U, UserDef::uiflag, USER_ZOOM_HORIZ, USER_ZOOM_TO_MOUSEPOS, viewdolly_apply(), viewdolly_exec(), RegionView3D::viewinv, viewops_data_create(), viewops_data_free(), WM_event_add_modal_handler(), wmEvent::x, and wmEvent::y.
Referenced by VIEW3D_OT_dolly().
static int viewdolly_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1798 of file view3d_edit.c.
References wmOperator::customdata, ED_view3d_depth_tag_update(), EVT_MODAL_MAP, KM_RELEASE, MOUSEMOVE, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::origkey, ViewOpsData::rv3d, wmEvent::type, U, UserDef::uiflag, USER_ZOOM_INVERT, 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(), wmEvent::x, and wmEvent::y.
Referenced by VIEW3D_OT_dolly().
void viewdolly_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 1645 of file view3d_edit.c.
References ESCKEY, KM_ANY, KM_PRESS, KM_RELEASE, MIDDLEMOUSE, NULL, VIEW_MODAL_CONFIRM, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ROTATE, WM_modalkeymap_add(), WM_modalkeymap_add_item(), WM_modalkeymap_assign(), and WM_modalkeymap_get().
Referenced by view3d_keymap().
static int viewdolly_poll | ( | bContext * | C | ) | [static] |
Definition at line 1943 of file view3d_edit.c.
References CTX_wm_region_view3d(), CTX_wm_view3d(), ED_view3d_camera_lock_check(), RegionView3D::persp, and RV3D_PERSP.
Referenced by VIEW3D_OT_dolly().
static void viewmove_apply | ( | ViewOpsData * | vod, |
int | x, | ||
int | y | ||
) | [static] |
Definition at line 1266 of file view3d_edit.c.
References add_v3_v3(), ViewOpsData::ar, BKE_screen_view3d_zoom_to_fac(), RegionView3D::camdx, RegionView3D::camdy, RegionView3D::camzoom, CLAMP(), ED_region_tag_redraw(), ED_view3d_camera_lock_check(), ED_view3d_camera_lock_sync(), ED_view3d_win_to_delta(), RegionView3D::ofs, ViewOpsData::oldx, ViewOpsData::oldy, RegionView3D::persp, ViewOpsData::rv3d, RV3D_BOXVIEW, RV3D_CAMOB, ViewOpsData::sa, ViewOpsData::v3d, view3d_boxview_sync(), RegionView3D::viewlock, ARegion::winx, and ARegion::winy.
Referenced by viewmove_invoke(), and viewmove_modal().
static int viewmove_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1365 of file view3d_edit.c.
References OPERATOR_CANCELLED, and viewops_data_free().
Referenced by VIEW3D_OT_move().
static int viewmove_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1341 of file view3d_edit.c.
References wmOperator::customdata, ED_view3d_depth_tag_update(), MOUSEPAN, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::prevx, wmEvent::prevy, ViewOpsData::rv3d, wmEvent::type, viewmove_apply(), viewops_data_create(), viewops_data_free(), and WM_event_add_modal_handler().
Referenced by VIEW3D_OT_move().
static int viewmove_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1298 of file view3d_edit.c.
References wmOperator::customdata, ED_view3d_depth_tag_update(), EVT_MODAL_MAP, KM_RELEASE, MOUSEMOVE, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::origkey, ViewOpsData::rv3d, wmEvent::type, wmEvent::val, VIEW_APPLY, VIEW_CONFIRM, VIEW_MODAL_CONFIRM, VIEW_PASS, viewmove_apply(), viewops_data_free(), VIEWROT_MODAL_SWITCH_ROTATE, VIEWROT_MODAL_SWITCH_ZOOM, WM_OP_INVOKE_DEFAULT, WM_operator_name_call(), wmEvent::x, and wmEvent::y.
Referenced by VIEW3D_OT_move().
void viewmove_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 1234 of file view3d_edit.c.
References ESCKEY, KM_ANY, KM_PRESS, KM_RELEASE, MIDDLEMOUSE, NULL, VIEW_MODAL_CONFIRM, VIEWROT_MODAL_SWITCH_ROTATE, VIEWROT_MODAL_SWITCH_ZOOM, WM_modalkeymap_add(), WM_modalkeymap_add_item(), WM_modalkeymap_assign(), and WM_modalkeymap_get().
Referenced by view3d_keymap().
static int viewnumpad_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2680 of file view3d_edit.c.
References axis_set_view(), Scene::camera, View3D::camera, copy_qt_qt(), cos(), CTX_data_scene(), RegionView3D::dist, ED_view3d_context_user_region(), G, handle_view3d_lock(), View3D::lens, RegionView3D::lpersp, LR_ALTKEY, RegionView3D::lview, RegionView3D::lviewquat, M_PI, NULL, OB_CAMERA, OBACT, RegionView3D::ofs, OPERATOR_CANCELLED, OPERATOR_FINISHED, RegionView3D::persp, wmOperator::ptr, ARegion::regiondata, RNA_boolean_get(), RNA_enum_get(), RV3D_CAMOB, RV3D_PERSP, RV3D_VIEW_BACK, RV3D_VIEW_BOTTOM, RV3D_VIEW_CAMERA, RV3D_VIEW_FRONT, RV3D_VIEW_LEFT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, scene_find_camera(), View3D::scenelock, sin(), RegionView3D::smooth_timer, smooth_view(), Object::type, RegionView3D::view, RegionView3D::viewlock, and RegionView3D::viewquat.
Referenced by VIEW3D_OT_viewnumpad().
static void viewops_data_create | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 402 of file view3d_edit.c.
References ViewOpsData::ar, calctrackballvec(), calculateTransformCenter(), closest_to_line_v3(), copy_m3_m4(), copy_qt_qt(), copy_v3_v3(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, RegionView3D::dist, ViewOpsData::dist0, ViewOpsData::dyn_ofs, ED_view3d_autodist(), ED_view3d_camera_lock_init(), ED_view3d_win_to_vector(), View3D::far, ViewOpsData::far, ListBase::first, View3D::grid, ViewOpsData::grid, initgrabz(), RegionView3D::is_persp, len_v3v3(), MEM_callocN(), ViewOpsData::mousevec, mul_m3_v3(), wmEvent::mval, negate_v3(), negate_v3_v3(), RegionView3D::ofs, ViewOpsData::ofs, ViewOpsData::oldquat, ViewOpsData::oldx, ViewOpsData::oldy, ViewOpsData::origkey, ViewOpsData::origx, ViewOpsData::origy, RegionView3D::persmat, ARegion::regiondata, ViewOpsData::reverse, RegionView3D::rflag, ViewOpsData::rv3d, RV3D_NAVIGATING, ViewOpsData::sa, ScrArea::spacedata, sub_v3_v3v3(), ViewOpsData::trackvec, U, UserDef::uiflag, ViewOpsData::use_dyn_ofs, USER_ORBIT_SELECTION, USER_ORBIT_ZBUF, ViewOpsData::v3d, V3D_CENTROID, VECCOPY2D, view3d_operator_needs_opengl(), RegionView3D::viewinv, RegionView3D::viewquat, ViewOpsData::viewquat, ARegion::winrct, wmEvent::x, and wmEvent::y.
Referenced by viewdolly_invoke(), viewmove_invoke(), viewrotate_invoke(), and viewzoom_invoke().
static void viewops_data_free | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 494 of file view3d_edit.c.
References ViewOpsData::ar, CTX_data_scene(), CTX_wm_manager(), CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), Paint::flags, MEM_freeN(), NULL, p, PAINT_FAST_NAVIGATE, paint_get_active(), 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(), viewrotate_cancel(), viewrotate_invoke(), viewrotate_modal(), viewzoom_cancel(), viewzoom_exec(), viewzoom_invoke(), and viewzoom_modal().
static int vieworbit_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2832 of file view3d_edit.c.
References copy_v3_v3(), cos(), CTX_wm_view3d(), ED_view3d_camera_lock_check(), ED_view3d_context_user_region(), M_PI, mul_qt_qtqt(), mul_v3_fl(), normalize_v3(), NULL, OPERATOR_FINISHED, UserDef::pad_rot_angle, RegionView3D::persp, wmOperator::ptr, ARegion::regiondata, RNA_enum_get(), RV3D_CAMOB, RV3D_VIEW_USER, si, sin(), smooth_view(), U, V3D_VIEW_STEPDOWN, V3D_VIEW_STEPLEFT, V3D_VIEW_STEPRIGHT, V3D_VIEW_STEPUP, RegionView3D::view, RegionView3D::viewinv, RegionView3D::viewlock, and RegionView3D::viewquat.
Referenced by VIEW3D_OT_view_orbit().
static int viewpan_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2903 of file view3d_edit.c.
References add_v3_v3(), CTX_wm_area(), CTX_wm_region(), CTX_wm_region_view3d(), ED_region_tag_redraw(), ED_view3d_win_to_delta(), initgrabz(), RegionView3D::ofs, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), RV3D_BOXVIEW, V3D_VIEW_PANDOWN, V3D_VIEW_PANLEFT, V3D_VIEW_PANRIGHT, V3D_VIEW_PANUP, view3d_boxview_sync(), and RegionView3D::viewlock.
Referenced by VIEW3D_OT_view_pan().
static int viewpersportho_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2944 of file view3d_edit.c.
References ED_region_tag_redraw(), ED_view3d_context_user_region(), OPERATOR_FINISHED, RegionView3D::persp, ARegion::regiondata, RV3D_ORTHO, RV3D_PERSP, and RegionView3D::viewlock.
Referenced by VIEW3D_OT_view_persportho().
static void viewrotate_apply | ( | ViewOpsData * | vod, |
int | x, | ||
int | y | ||
) | [static] |
Definition at line 623 of file view3d_edit.c.
References add_v3_v3(), angle(), angle_v3v3(), ViewOpsData::ar, axis_angle_to_quat(), ViewOpsData::axis_snap, calctrackballvec(), conjugate_qt(), copy_qt_qt(), copy_v3_v3(), cos(), cross_v3_v3v3(), DEG2RADF, ViewOpsData::dyn_ofs, ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), UserDef::flag, FLT_MAX, i, invert_m3_m3(), invert_qt_qt(), M_PI, mul_m3_v3(), mul_qt_qtqt(), mul_qt_v3(), mul_v3_fl(), mul_v3_v3fl(), normalize_qt(), normalize_v3(), ViewOpsData::ofs, RegionView3D::ofs, ViewOpsData::oldquat, ViewOpsData::oldx, ViewOpsData::oldy, quat_to_mat3(), ViewOpsData::reverse, rotation_between_vecs_to_quat(), ViewOpsData::rv3d, RV3D_VIEW_USER, si, sin(), snapquats, sqrt(), sub_v3_v3(), sub_v3_v3v3(), TRACKBALLSIZE, ViewOpsData::trackvec, U, ViewOpsData::use_dyn_ofs, USER_TRACKBALL, ViewOpsData::v3d, RegionView3D::view, RegionView3D::viewquat, ViewOpsData::viewquat, and ARegion::winrct.
Referenced by viewrotate_invoke(), and viewrotate_modal().
static int viewrotate_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 940 of file view3d_edit.c.
References OPERATOR_CANCELLED, and viewops_data_free().
Referenced by VIEW3D_OT_rotate().
static int viewrotate_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 850 of file view3d_edit.c.
References ViewOpsData::ar, View3D::camera, wmOperator::customdata, RegionView3D::dist, ED_region_tag_redraw(), ED_view3d_camera_lock_check(), ED_view3d_depth_tag_update(), ED_view3d_from_object(), RegionView3D::lpersp, MOUSEPAN, MOUSEROTATE, NULL, RegionView3D::ofs, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, RegionView3D::persp, wmEvent::prevx, wmEvent::prevy, ViewOpsData::rv3d, RV3D_CAMOB, RV3D_PERSP, wmEvent::type, U, UserDef::uiflag, USER_AUTOPERSP, ViewOpsData::v3d, RegionView3D::viewlock, viewops_data_create(), viewops_data_free(), RegionView3D::viewquat, viewrotate_apply(), WM_event_add_modal_handler(), and wmEvent::y.
Referenced by VIEW3D_OT_rotate().
static int viewrotate_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 801 of file view3d_edit.c.
References ViewOpsData::axis_snap, wmOperator::customdata, ED_view3d_depth_tag_update(), EVT_MODAL_MAP, FALSE, KM_RELEASE, MOUSEMOVE, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::origkey, ViewOpsData::rv3d, TRUE, wmEvent::type, wmEvent::val, VIEW_APPLY, VIEW_CONFIRM, VIEW_MODAL_CONFIRM, VIEW_PASS, viewops_data_free(), VIEWROT_MODAL_AXIS_SNAP_DISABLE, VIEWROT_MODAL_AXIS_SNAP_ENABLE, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ZOOM, viewrotate_apply(), WM_OP_INVOKE_DEFAULT, WM_operator_name_call(), wmEvent::x, and wmEvent::y.
Referenced by VIEW3D_OT_rotate().
void viewrotate_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 585 of file view3d_edit.c.
References ESCKEY, KM_ANY, KM_PRESS, KM_RELEASE, LEFTALTKEY, MIDDLEMOUSE, NULL, VIEW_MODAL_CONFIRM, VIEWROT_MODAL_AXIS_SNAP_DISABLE, VIEWROT_MODAL_AXIS_SNAP_ENABLE, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ZOOM, WM_modalkeymap_add(), WM_modalkeymap_add_item(), WM_modalkeymap_assign(), and WM_modalkeymap_get().
Referenced by view3d_keymap().
static int viewselected_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2095 of file view3d_edit.c.
References add_v3_v3v3(), Scene::base, bPoseChannel::bone, BONE_SELECTED, View3D::camera, bPose::chanbase, CTX_data_edit_object(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), bPoseChannel::custom_tx, Object::data, DO_MINMAX, ED_view3d_camera_lock_check(), ListBase::first, FIRSTBASE, Bone::flag, INIT_MINMAX, RegionView3D::is_persp, bArmature::layer, Bone::layer, max, MAX3(), min, minmax_object(), minmax_object_duplis(), minmax_verts(), Object::mode, mul_v3_fl(), mul_v3_m4v3(), View3D::near, bPoseChannel::next, Base::next, NULL, OB_ARMATURE, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE, OB_MODE_WEIGHT_PAINT, OBACT, Base::object, Object::obmat, OPERATOR_FINISHED, paint_facesel_test(), paintface_minmax(), PE_minmax(), RegionView3D::persp, Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_tail, RV3D_CAMOB, RV3D_PERSP, size(), smooth_view(), sub_v3_v3v3(), TESTBASE, TESTBASELIB, Object::type, ARegion::winx, and ARegion::winy.
Referenced by VIEW3D_OT_view_selected().
static void viewzoom_apply | ( | ViewOpsData * | vod, |
int | x, | ||
int | y, | ||
const short | viewzoom, | ||
const short | zoom_invert | ||
) | [static] |
Definition at line 1463 of file view3d_edit.c.
References ViewOpsData::ar, RegionView3D::dist, ViewOpsData::dist0, ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), ViewOpsData::far, ViewOpsData::grid, ViewOpsData::oldx, ViewOpsData::oldy, ViewOpsData::origx, ViewOpsData::origy, PIL_check_seconds_timer(), ViewOpsData::rv3d, RV3D_BOXVIEW, ViewOpsData::sa, sqrt(), SWAP, ViewOpsData::timer_lastdraw, U, UserDef::uiflag, USER_ZOOM_CONT, USER_ZOOM_HORIZ, USER_ZOOM_SCALE, ViewOpsData::v3d, view3d_boxview_sync(), view_zoom_mouseloc(), RegionView3D::viewlock, ARegion::winrct, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by viewzoom_invoke(), and viewzoom_modal().
static int viewzoom_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1728 of file view3d_edit.c.
References OPERATOR_CANCELLED, and viewops_data_free().
Referenced by VIEW3D_OT_zoom().
static int viewzoom_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1579 of file view3d_edit.c.
References ViewOpsData::ar, RegionView3D::camzoom, CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, RegionView3D::dist, ED_region_tag_redraw(), ED_view3d_camera_lock_check(), ED_view3d_camera_lock_sync(), ED_view3d_depth_tag_update(), View3D::far, ListBase::first, View3D::grid, RegionView3D::is_persp, OPERATOR_FINISHED, RegionView3D::persp, wmOperator::ptr, ARegion::regiondata, RNA_int_get(), RNA_struct_property_is_set(), RV3D_BOXVIEW, RV3D_CAMOB, RV3D_CAMZOOM_MAX, RV3D_CAMZOOM_MIN, ViewOpsData::sa, ScrArea::spacedata, view3d_boxview_sync(), view_zoom_mouseloc(), RegionView3D::viewlock, viewops_data_free(), ARegion::winx, and ARegion::winy.
Referenced by VIEW3D_OT_zoom(), and viewzoom_invoke().
static int viewzoom_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1677 of file view3d_edit.c.
References CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, ED_view3d_depth_tag_update(), FALSE, MOUSEZOOM, ViewOpsData::oldx, ViewOpsData::oldy, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::origx, ViewOpsData::origy, PIL_check_seconds_timer(), wmEvent::prevx, wmEvent::prevy, wmOperator::ptr, RNA_int_set(), RNA_struct_property_is_set(), ViewOpsData::rv3d, TIMER, ViewOpsData::timer, ViewOpsData::timer_lastdraw, wmEvent::type, U, UserDef::uiflag, USER_ZOOM_CONT, USER_ZOOM_DOLLY, USER_ZOOM_HORIZ, viewops_data_create(), viewops_data_free(), UserDef::viewzoom, viewzoom_apply(), viewzoom_exec(), WM_event_add_modal_handler(), WM_event_add_timer(), wmEvent::x, and wmEvent::y.
Referenced by VIEW3D_OT_zoom().
static int viewzoom_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1534 of file view3d_edit.c.
References wmEvent::customdata, wmOperator::customdata, ED_view3d_depth_tag_update(), EVT_MODAL_MAP, KM_RELEASE, MOUSEMOVE, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::origkey, ViewOpsData::rv3d, ViewOpsData::timer, TIMER, wmEvent::type, U, UserDef::uiflag, USER_ZOOM_INVERT, wmEvent::val, VIEW_APPLY, VIEW_CONFIRM, VIEW_MODAL_CONFIRM, VIEW_PASS, viewops_data_free(), VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ROTATE, UserDef::viewzoom, viewzoom_apply(), WM_OP_INVOKE_DEFAULT, WM_operator_name_call(), wmEvent::x, and wmEvent::y.
Referenced by VIEW3D_OT_zoom().
void viewzoom_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 1394 of file view3d_edit.c.
References ESCKEY, KM_ANY, KM_PRESS, KM_RELEASE, MIDDLEMOUSE, NULL, VIEW_MODAL_CONFIRM, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ROTATE, WM_modalkeymap_add(), WM_modalkeymap_add_item(), WM_modalkeymap_assign(), and WM_modalkeymap_get().
Referenced by view3d_keymap().
EnumPropertyItem prop_view_items[] [static] |
{ {RV3D_VIEW_FRONT, "FRONT", 0, "Front", "View From the Front"}, {RV3D_VIEW_BACK, "BACK", 0, "Back", "View From the Back"}, {RV3D_VIEW_LEFT, "LEFT", 0, "Left", "View From the Left"}, {RV3D_VIEW_RIGHT, "RIGHT", 0, "Right", "View From the Right"}, {RV3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"}, {RV3D_VIEW_BOTTOM, "BOTTOM", 0, "Bottom", "View From the Bottom"}, {RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active camera"}, {0, NULL, 0, NULL, NULL}}
Definition at line 2598 of file view3d_edit.c.
EnumPropertyItem prop_view_orbit_items[] [static] |
{ {V3D_VIEW_STEPLEFT, "ORBITLEFT", 0, "Orbit Left", "Orbit the view around to the Left"}, {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, "Orbit Right", "Orbit the view around to the Right"}, {V3D_VIEW_STEPUP, "ORBITUP", 0, "Orbit Up", "Orbit the view Up"}, {V3D_VIEW_STEPDOWN, "ORBITDOWN", 0, "Orbit Down", "Orbit the view Down"}, {0, NULL, 0, NULL, NULL}}
Definition at line 2825 of file view3d_edit.c.
EnumPropertyItem prop_view_pan_items[] [static] |
{ {V3D_VIEW_PANLEFT, "PANLEFT", 0, "Pan Left", "Pan the view to the Left"}, {V3D_VIEW_PANRIGHT, "PANRIGHT", 0, "Pan Right", "Pan the view to the Right"}, {V3D_VIEW_PANUP, "PANUP", 0, "Pan Up", "Pan the view Up"}, {V3D_VIEW_PANDOWN, "PANDOWN", 0, "Pan Down", "Pan the view Down"}, {0, NULL, 0, NULL, NULL}}
Definition at line 2896 of file view3d_edit.c.
float snapquats[39][5] [static] |
Definition at line 525 of file view3d_edit.c.
Referenced by viewrotate_apply().
const float thres = 0.93f [static] |
Definition at line 520 of file view3d_edit.c.