Blender
V3.3
|
#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) |
anonymous enum |
Enumerator | |
---|---|
V3D_VIEW_STEPLEFT | |
V3D_VIEW_STEPRIGHT |
Definition at line 144 of file view3d_navigate_roll.c.
void VIEW3D_OT_view_roll | ( | wmOperatorType * | ot | ) |
Definition at line 272 of file view3d_navigate_roll.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_SKIP_SAVE, prop_view_roll_items, RNA_def_enum(), RNA_def_float(), RNA_def_property_flag(), wmOperatorType::srna, viewroll_cancel(), viewroll_exec(), viewroll_invoke(), and viewroll_modal().
Referenced by view3d_operatortypes().
|
static |
use_axis_view | When 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().
|
static |
Definition at line 60 of file view3d_navigate_roll.c.
References angle(), ViewOpsData::area, BLI_dial_angle(), ViewOpsData::depsgraph, ViewOpsData::dial, ViewOpsData::dyn_ofs, ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), ViewOpsData::init, ViewOpsData::mousevec, ViewOpsData::ofs, RegionView3D::ofs, ViewOpsData::quat, ViewOpsData::region, ViewOpsData::rv3d, RV3D_BOXVIEW, RV3D_LOCK_FLAGS, ViewOpsData::use_dyn_ofs, ViewOpsData::v3d, view3d_boxview_sync(), view3d_orbit_apply_dyn_ofs(), view_roll_angle(), and RegionView3D::viewquat.
Referenced by viewroll_invoke(), and viewroll_modal().
|
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().
|
static |
Definition at line 156 of file view3d_navigate_roll.c.
References angle(), C, CTX_data_ensure_evaluated_depsgraph(), wmOperator::customdata, DEG2RADF, depsgraph, ED_view3d_camera_lock_check(), ED_view3d_camera_lock_init(), ED_view3d_context_user_region(), ED_view3d_smooth_view(), ED_view3d_smooth_view_force_finish(), wmOperatorType::name, negate_v3(), normalize_v3_v3(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, RegionView3D::persp, wmOperator::ptr, ViewOpsData::region, ARegion::regiondata, RNA_enum_get(), RNA_float_get(), RV3D_CAMOB, type, wmOperator::type, USER_ORBIT_SELECTION, ViewOpsData::v3d, V3D_VIEW_STEPLEFT, view3d_orbit_calc_center(), view_roll_angle(), RegionView3D::viewinv, viewops_data_free(), RegionView3D::viewquat, and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_roll(), and viewroll_invoke().
|
static |
Definition at line 228 of file view3d_navigate_roll.c.
References BLI_dial_init(), BLI_rcti_cent_x(), BLI_rcti_cent_y(), C, wmOperator::customdata, ViewOpsData::dial, ED_view3d_smooth_view_force_finish(), ViewOpsData::event_xy, ViewOpsData::init, MOUSEROTATE, ViewOpsData::mousevec, negate_v3(), normalize_v3_v3(), NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::prev, wmEvent::prev_xy, wmOperator::ptr, ViewOpsData::region, RNA_enum_get(), RNA_struct_property_is_set(), ViewOpsData::rv3d, wmEvent::type, ViewOpsData::v3d, RegionView3D::viewinv, viewops_data_create(), viewops_data_free(), viewops_flag_from_prefs(), viewroll_apply(), viewroll_exec(), ARegion::winrct, and WM_event_add_modal_handler().
Referenced by VIEW3D_OT_view_roll().
|
static |
Definition at line 83 of file view3d_navigate_roll.c.
References C, copy_qt_qt(), CTX_wm_manager(), wmOperator::customdata, ViewOpsData::depsgraph, ED_screen_animation_playing(), ED_view3d_camera_lock_autokey(), ED_view3d_camera_lock_sync(), ELEM, ViewOpsData::event_type, EVT_ESCKEY, EVT_MODAL_MAP, ViewOpsData::init, KM_RELEASE, MOUSEMOVE, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::quat, ret, RIGHTMOUSE, ViewOpsData::rv3d, wmEvent::type, ViewOpsData::v3d, wmEvent::val, VIEW_APPLY, VIEW_CONFIRM, VIEW_MODAL_CONFIRM, VIEW_PASS, viewops_data_free(), RegionView3D::viewquat, viewroll_apply(), VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ROTATE, WM_OP_INVOKE_DEFAULT, WM_operator_name_call(), and wmEvent::xy.
Referenced by VIEW3D_OT_view_roll().
|
static |
Definition at line 149 of file view3d_navigate_roll.c.
Referenced by VIEW3D_OT_view_roll().