Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations | Functions | Variables

view3d_edit.c File Reference

#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.

Classes

struct  ViewOpsData

Defines

#define TRACKBALLSIZE   (1.1)
#define COS45   0.70710678118654746
#define SIN45   COS45
#define VIEW_MODAL_CONFIRM   1
#define VIEWROT_MODAL_AXIS_SNAP_ENABLE   2
#define VIEWROT_MODAL_AXIS_SNAP_DISABLE   3
#define VIEWROT_MODAL_SWITCH_ZOOM   4
#define VIEWROT_MODAL_SWITCH_MOVE   5
#define VIEWROT_MODAL_SWITCH_ROTATE   6

Typedefs

typedef struct ViewOpsData ViewOpsData

Enumerations

enum  { VIEW_PASS = 0, VIEW_APPLY, VIEW_CONFIRM }

Functions

int ED_view3d_camera_lock_check (View3D *v3d, RegionView3D *rv3d)
void ED_view3d_camera_lock_init (View3D *v3d, RegionView3D *rv3d)
int ED_view3d_camera_lock_sync (View3D *v3d, RegionView3D *rv3d)
static void view3d_boxview_clip (ScrArea *sa)
static void view3d_boxview_sync (ScrArea *sa, ARegion *ar)
void view3d_boxview_copy (ScrArea *sa, ARegion *ar)
void ED_view3d_quadview_update (ScrArea *sa, ARegion *ar, short do_clip)
static void calctrackballvec (rcti *rect, int mx, int my, float *vec)
static void viewops_data_create (bContext *C, wmOperator *op, wmEvent *event)
static void viewops_data_free (bContext *C, wmOperator *op)
void viewrotate_modal_keymap (wmKeyConfig *keyconf)
static void viewrotate_apply (ViewOpsData *vod, int x, int y)
static int viewrotate_modal (bContext *C, wmOperator *op, wmEvent *event)
static int viewrotate_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int view3d_camera_active_poll (bContext *C)
static int view3d_camera_user_poll (bContext *C)
static int viewrotate_cancel (bContext *C, wmOperator *op)
void VIEW3D_OT_rotate (wmOperatorType *ot)
float ndof_to_axis_angle (struct wmNDOFMotionData *ndof, float axis[3])
void ndof_to_quat (struct wmNDOFMotionData *ndof, float q[4])
static int ndof_orbit_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *event)
void VIEW3D_OT_ndof_orbit (struct wmOperatorType *ot)
static int ndof_pan_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *event)
void VIEW3D_OT_ndof_pan (struct wmOperatorType *ot)
void viewmove_modal_keymap (wmKeyConfig *keyconf)
static void viewmove_apply (ViewOpsData *vod, int x, int y)
static int viewmove_modal (bContext *C, wmOperator *op, wmEvent *event)
static int viewmove_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int viewmove_cancel (bContext *C, wmOperator *op)
void VIEW3D_OT_move (wmOperatorType *ot)
void viewzoom_modal_keymap (wmKeyConfig *keyconf)
static void view_zoom_mouseloc (ARegion *ar, float dfac, int mx, int my)
static void viewzoom_apply (ViewOpsData *vod, int x, int y, const short viewzoom, const short zoom_invert)
static int viewzoom_modal (bContext *C, wmOperator *op, wmEvent *event)
static int viewzoom_exec (bContext *C, wmOperator *op)
void viewdolly_modal_keymap (wmKeyConfig *keyconf)
static int viewzoom_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int viewzoom_cancel (bContext *C, wmOperator *op)
void VIEW3D_OT_zoom (wmOperatorType *ot)
static void view_dolly_mouseloc (ARegion *ar, float orig_ofs[3], float dvec[3], float dfac)
static void viewdolly_apply (ViewOpsData *vod, int x, int y, const short zoom_invert)
static int viewdolly_modal (bContext *C, wmOperator *op, wmEvent *event)
static int viewdolly_exec (bContext *C, wmOperator *op)
static int viewdolly_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int viewdolly_poll (bContext *C)
static int viewdolly_cancel (bContext *C, wmOperator *op)
void VIEW3D_OT_dolly (wmOperatorType *ot)
static int view3d_all_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_view_all (wmOperatorType *ot)
static int viewselected_exec (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_selected (wmOperatorType *ot)
static int viewcenter_cursor_exec (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_center_cursor (wmOperatorType *ot)
static int view3d_center_camera_exec (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_center_camera (wmOperatorType *ot)
static int render_border_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_render_border (wmOperatorType *ot)
static int view3d_zoom_border_exec (bContext *C, wmOperator *op)
static int view3d_zoom_border_invoke (bContext *C, wmOperator *op, wmEvent *event)
void VIEW3D_OT_zoom_border (wmOperatorType *ot)
static void view3d_set_1_to_1_viewborder (Scene *scene, ARegion *ar, View3D *v3d)
static int view3d_zoom_1_to_1_camera_exec (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_zoom_camera_1_to_1 (wmOperatorType *ot)
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 int viewnumpad_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_viewnumpad (wmOperatorType *ot)
static int vieworbit_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_view_orbit (wmOperatorType *ot)
static int viewpan_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_view_pan (wmOperatorType *ot)
static int viewpersportho_exec (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_persportho (wmOperatorType *ot)
static BGpicbackground_image_add (bContext *C)
static int background_image_add_exec (bContext *C, wmOperator *UNUSED(op))
static int background_image_add_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void VIEW3D_OT_background_image_add (wmOperatorType *ot)
static int background_image_remove_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_background_image_remove (wmOperatorType *ot)
static void calc_clipping_plane (float clip[6][4], BoundBox *clipbb)
static void calc_local_clipping (float clip_local[][4], BoundBox *clipbb, float mat[][4])
void ED_view3d_local_clipping (RegionView3D *rv3d, float mat[][4])
static int view3d_clipping_exec (bContext *C, wmOperator *op)
static int view3d_clipping_invoke (bContext *C, wmOperator *op, wmEvent *event)
void VIEW3D_OT_clip_border (wmOperatorType *ot)
static int set_3dcursor_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *event)
void VIEW3D_OT_cursor3d (wmOperatorType *ot)
static int manipulator_invoke (bContext *C, wmOperator *op, wmEvent *event)
void VIEW3D_OT_manipulator (wmOperatorType *ot)
static int enable_manipulator_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void VIEW3D_OT_enable_manipulator (wmOperatorType *ot)
static float view_autodist_depth_margin (ARegion *ar, const int mval[2], int margin)
int ED_view3d_autodist (Scene *scene, ARegion *ar, View3D *v3d, const int mval[2], float mouse_worldloc[3])
int ED_view3d_autodist_init (Scene *scene, ARegion *ar, View3D *v3d, int mode)
int ED_view3d_autodist_simple (ARegion *ar, const int mval[2], float mouse_worldloc[3], int margin, float *force_depth)
int ED_view3d_autodist_depth (struct ARegion *ar, const int mval[2], int margin, float *depth)
static int depth_segment_cb (int x, int y, void *userData)
int ED_view3d_autodist_depth_seg (struct ARegion *ar, const int mval_sta[2], const int mval_end[2], int margin, float *depth)
void ED_view3d_from_m4 (float mat[][4], float ofs[3], float quat[4], float *dist)
void ED_view3d_to_m4 (float mat[][4], const float ofs[3], const float quat[4], const float dist)
void ED_view3d_from_object (Object *ob, float ofs[3], float quat[4], float *dist, float *lens)
void ED_view3d_to_object (Object *ob, const float ofs[3], const float quat[4], const float dist)
BGpicED_view3D_background_image_new (View3D *v3d)
void ED_view3D_background_image_remove (View3D *v3d, BGpic *bgpic)
void ED_view3D_background_image_clear (View3D *v3d)

Variables

static const float thres = 0.93f
static float snapquats [39][5]
static EnumPropertyItem prop_view_items []
static EnumPropertyItem prop_view_orbit_items []
static EnumPropertyItem prop_view_pan_items []

Detailed Description

Definition in file view3d_edit.c.


Define Documentation

#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
#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
#define VIEWROT_MODAL_SWITCH_ROTATE   6
#define VIEWROT_MODAL_SWITCH_ZOOM   4

Typedef Documentation

typedef struct ViewOpsData ViewOpsData

Enumeration Type Documentation

anonymous enum
Enumerator:
VIEW_PASS 
VIEW_APPLY 
VIEW_CONFIRM 

Definition at line 570 of file view3d_edit.c.


Function Documentation

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]
static BGpic* background_image_add ( bContext C) [static]
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]
static int background_image_remove_exec ( bContext C,
wmOperator op 
) [static]
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]
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] 
)
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().

int ED_view3d_autodist_init ( Scene scene,
ARegion ar,
View3D v3d,
int  mode 
)

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 
)
void ED_view3D_background_image_clear ( View3D v3d)
BGpic* ED_view3D_background_image_new ( View3D v3d) [read]
void ED_view3D_background_image_remove ( View3D v3d,
BGpic bgpic 
)
int ED_view3d_camera_lock_check ( View3D v3d,
RegionView3D rv3d 
)
void ED_view3d_camera_lock_init ( View3D v3d,
RegionView3D rv3d 
)
int ED_view3d_camera_lock_sync ( View3D v3d,
RegionView3D rv3d 
)
void ED_view3d_from_m4 ( float  mat[][4],
float  ofs[3],
float  quat[4],
float *  dist 
)

Set the view transformation from a 4x4 matrix.

Parameters:
matThe view 4x4 transformation matrix to assign.
ofsThe view offset, normally from RegionView3D.ofs.
quatThe view rotation, quaternion normally from RegionView3D.viewquat.
distThe 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.

Parameters:
obThe object to set the view to.
ofsThe view offset to be set, normally from RegionView3D.ofs.
quatThe view rotation to be set, quaternion normally from RegionView3D.viewquat.
distThe view distance from ofs to be set, normally from RegionView3D.dist.
lensThe 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] 
)
void ED_view3d_quadview_update ( ScrArea sa,
ARegion ar,
short  do_clip 
)
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

Parameters:
matThe view 4x4 transformation matrix to calculate.
ofsThe view offset, normally from RegionView3D.ofs.
quatThe view rotation, quaternion normally from RegionView3D.viewquat.
distThe 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.

Parameters:
obThe object which has the transformation assigned.
ofsThe view offset, normally from RegionView3D.ofs.
quatThe view rotation, quaternion normally from RegionView3D.viewquat.
distThe 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]
static int manipulator_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int ndof_orbit_invoke ( bContext C,
wmOperator UNUSEDop,
wmEvent event 
) [static]
static int ndof_pan_invoke ( bContext C,
wmOperator UNUSEDop,
wmEvent event 
) [static]
float ndof_to_axis_angle ( struct wmNDOFMotionData ndof,
float  axis[3] 
)
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]
static int set_3dcursor_invoke ( bContext C,
wmOperator UNUSEDop,
wmEvent event 
) [static]
static int view3d_all_exec ( bContext C,
wmOperator op 
) [static]
static void view3d_boxview_clip ( ScrArea sa) [static]
void view3d_boxview_copy ( ScrArea sa,
ARegion ar 
)
static void view3d_boxview_sync ( ScrArea sa,
ARegion ar 
) [static]
static int view3d_camera_active_poll ( bContext C) [static]
static int view3d_camera_user_poll ( bContext C) [static]
static int view3d_center_camera_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int view3d_clipping_exec ( bContext C,
wmOperator op 
) [static]
static int view3d_clipping_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
void VIEW3D_OT_background_image_add ( wmOperatorType ot)
void VIEW3D_OT_background_image_remove ( wmOperatorType ot)
void VIEW3D_OT_clip_border ( wmOperatorType ot)
void VIEW3D_OT_cursor3d ( wmOperatorType ot)
void VIEW3D_OT_dolly ( wmOperatorType ot)
void VIEW3D_OT_enable_manipulator ( wmOperatorType ot)
void VIEW3D_OT_manipulator ( wmOperatorType ot)
void VIEW3D_OT_move ( wmOperatorType ot)
void VIEW3D_OT_ndof_orbit ( struct wmOperatorType ot)
void VIEW3D_OT_ndof_pan ( struct wmOperatorType ot)
void VIEW3D_OT_render_border ( wmOperatorType ot)
void VIEW3D_OT_rotate ( wmOperatorType ot)
void VIEW3D_OT_view_all ( wmOperatorType ot)
void VIEW3D_OT_view_center_camera ( wmOperatorType ot)
void VIEW3D_OT_view_center_cursor ( wmOperatorType ot)
void VIEW3D_OT_view_orbit ( wmOperatorType ot)
void VIEW3D_OT_view_pan ( wmOperatorType ot)
void VIEW3D_OT_view_persportho ( wmOperatorType ot)
void VIEW3D_OT_view_selected ( wmOperatorType ot)
void VIEW3D_OT_viewnumpad ( wmOperatorType ot)
void VIEW3D_OT_zoom ( wmOperatorType ot)
void VIEW3D_OT_zoom_border ( wmOperatorType ot)
void VIEW3D_OT_zoom_camera_1_to_1 ( wmOperatorType ot)
static void view3d_set_1_to_1_viewborder ( Scene scene,
ARegion ar,
View3D v3d 
) [static]
static int view3d_zoom_1_to_1_camera_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int view3d_zoom_border_exec ( bContext C,
wmOperator op 
) [static]
static int view3d_zoom_border_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static float view_autodist_depth_margin ( ARegion ar,
const int  mval[2],
int  margin 
) [static]
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]
static int viewcenter_cursor_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void viewdolly_apply ( ViewOpsData vod,
int  x,
int  y,
const short  zoom_invert 
) [static]
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]
static int viewdolly_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int viewdolly_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
void viewdolly_modal_keymap ( wmKeyConfig keyconf)
static int viewdolly_poll ( bContext C) [static]
static void viewmove_apply ( ViewOpsData vod,
int  x,
int  y 
) [static]
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]
static int viewmove_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
void viewmove_modal_keymap ( wmKeyConfig keyconf)
static int viewnumpad_exec ( bContext C,
wmOperator op 
) [static]
static void viewops_data_create ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static void viewops_data_free ( bContext C,
wmOperator op 
) [static]
static int vieworbit_exec ( bContext C,
wmOperator op 
) [static]
static int viewpan_exec ( bContext C,
wmOperator op 
) [static]
static int viewpersportho_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void viewrotate_apply ( ViewOpsData vod,
int  x,
int  y 
) [static]
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]
static int viewrotate_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
void viewrotate_modal_keymap ( wmKeyConfig keyconf)
static int viewselected_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void viewzoom_apply ( ViewOpsData vod,
int  x,
int  y,
const short  viewzoom,
const short  zoom_invert 
) [static]
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]
static int viewzoom_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int viewzoom_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
void viewzoom_modal_keymap ( wmKeyConfig keyconf)

Variable Documentation

Initial value:
 {
    {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.

Initial value:
 {
    {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.

Initial value:
 {
    {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.