Blender  V3.3
view3d_navigate_roll.c File Reference
#include "BLI_blenlib.h"
#include "BLI_dial_2d.h"
#include "BLI_math.h"
#include "BKE_context.h"
#include "WM_api.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "DEG_depsgraph_query.h"
#include "ED_screen.h"
#include "view3d_intern.h"
#include "view3d_navigate.h"

Go to the source code of this file.

View Roll Operator

enum  { V3D_VIEW_STEPLEFT = 1 , V3D_VIEW_STEPRIGHT }
 
static const EnumPropertyItem prop_view_roll_items []
 
static void view_roll_angle (ARegion *region, float quat[4], const float orig_quat[4], const float dvec[3], float angle, bool use_axis_view)
 
static void viewroll_apply (ViewOpsData *vod, int x, int y)
 
static int viewroll_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
static int viewroll_exec (bContext *C, wmOperator *op)
 
static int viewroll_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static void viewroll_cancel (bContext *C, wmOperator *op)
 
void VIEW3D_OT_view_roll (wmOperatorType *ot)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
V3D_VIEW_STEPLEFT 
V3D_VIEW_STEPRIGHT 

Definition at line 144 of file view3d_navigate_roll.c.

Function Documentation

◆ VIEW3D_OT_view_roll()

void VIEW3D_OT_view_roll ( wmOperatorType ot)

◆ view_roll_angle()

static void view_roll_angle ( ARegion region,
float  quat[4],
const float  orig_quat[4],
const float  dvec[3],
float  angle,
bool  use_axis_view 
)
static
Parameters
use_axis_viewWhen true, keep axis-aligned orthographic views (when rotating in 90 degree increments). While this may seem obscure some NDOF devices have key shortcuts to do this (see NDOF_BUTTON_ROLL_CW & NDOF_BUTTON_ROLL_CCW).

Definition at line 34 of file view3d_navigate_roll.c.

References angle(), axis_angle_normalized_to_quat(), ED_view3d_quat_to_axis_view_and_reset_quat(), fabsf, M_PI_2, mul_qt_qtqt(), normalize_qt(), ARegion::regiondata, RV3D_VIEW_IS_AXIS, RV3D_VIEW_USER, RegionView3D::view, and RegionView3D::view_axis_roll.

Referenced by viewroll_apply(), and viewroll_exec().

◆ viewroll_apply()

static void viewroll_apply ( ViewOpsData vod,
int  x,
int  y 
)
static

◆ viewroll_cancel()

static void viewroll_cancel ( bContext C,
wmOperator op 
)
static

Definition at line 266 of file view3d_navigate_roll.c.

References C, wmOperator::customdata, NULL, and viewops_data_free().

Referenced by VIEW3D_OT_view_roll().

◆ viewroll_exec()

static int viewroll_exec ( bContext C,
wmOperator op 
)
static

◆ viewroll_invoke()

static int viewroll_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ viewroll_modal()

static int viewroll_modal ( bContext C,
wmOperator op,
const wmEvent event 
)
static

Variable Documentation

◆ prop_view_roll_items

const EnumPropertyItem prop_view_roll_items[]
static
Initial value:
= {
{0, "ANGLE", 0, "Roll Angle", "Roll the view using an angle value"},
{V3D_VIEW_STEPLEFT, "LEFT", 0, "Roll Left", "Roll the view around to the left"},
{V3D_VIEW_STEPRIGHT, "RIGHT", 0, "Roll Right", "Roll the view around to the right"},
{0, NULL, 0, NULL, NULL},
}
@ V3D_VIEW_STEPRIGHT
@ V3D_VIEW_STEPLEFT

Definition at line 149 of file view3d_navigate_roll.c.

Referenced by VIEW3D_OT_view_roll().