Blender V4.3
view3d_navigate_view_roll.cc File Reference
#include "BLI_blenlib.h"
#include "BLI_dial_2d.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BKE_context.hh"
#include "WM_api.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "ED_screen.hh"
#include "view3d_intern.hh"
#include "view3d_navigate.hh"

Go to the source code of this file.

Variables

const ViewOpsType ViewOpsType_roll
 

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)
 
void VIEW3D_OT_view_roll (wmOperatorType *ot)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
V3D_VIEW_STEPLEFT 
V3D_VIEW_STEPRIGHT 

Definition at line 161 of file view3d_navigate_view_roll.cc.

Function Documentation

◆ VIEW3D_OT_view_roll()

◆ 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 35 of file view3d_navigate_view_roll.cc.

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

Referenced by viewroll_apply(), and viewroll_exec().

◆ viewroll_apply()

◆ viewroll_exec()

◆ viewroll_invoke()

◆ viewroll_modal()

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, nullptr, 0, nullptr, nullptr},
}

Definition at line 166 of file view3d_navigate_view_roll.cc.

Referenced by VIEW3D_OT_view_roll().

◆ ViewOpsType_roll

const ViewOpsType ViewOpsType_roll
Initial value:
= {
"VIEW3D_OT_view_roll",
nullptr,
nullptr,
nullptr,
}
@ VIEWOPS_FLAG_ORBIT_SELECT

Definition at line 302 of file view3d_navigate_view_roll.cc.

Referenced by VIEW3D_OT_view_roll(), viewroll_exec(), and viewroll_invoke().