39 const float orig_quat[4],
78 if (!is_camera_lock) {
103 bool use_autokey =
false;
108 switch (event->
val) {
131 else if (event->
type == vod->
init.event_type) {
145 switch (event_code) {
183 {0,
"ANGLE", 0,
"Roll Angle",
"Roll the view using an angle value"},
186 {0,
nullptr, 0,
nullptr,
nullptr},
229 if (!is_camera_lock) {
236 sview_params.
quat = quat_new;
294 vod->
init.event_xy[0] = vod->
prev.event_xy[0] =
event->xy[0];
314 ot->
name =
"View Roll";
337 "How roll angle is calculated");
345 "VIEW3D_OT_view_roll",
#define RV3D_VIEW_IS_AXIS(view)
#define RV3D_LOCK_FLAGS(rv3d)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const ViewOpsType ViewOpsType_roll
bool ED_view3d_context_user_region(bContext *C, View3D **r_v3d, ARegion **r_region)
bool ED_view3d_camera_lock_autokey(View3D *v3d, RegionView3D *rv3d, bContext *C, bool do_rotate, bool do_translate)
bool ED_view3d_quat_to_axis_view_and_reset_quat(float quat[4], float epsilon, eRegionView3D_View *r_view, eRegionView3D_ViewAxisRoll *r_view_axis_roll)
bool ED_view3d_camera_lock_check(const View3D *v3d, const RegionView3D *rv3d)
int RNA_enum_get(PointerRNA *ptr, const char *name)
bool ED_operator_rv3d_user_region_poll(bContext *C)
void viewops_data_free(bContext *C, ViewOpsData *vod)
void axis_angle_normalized_to_quat(float r[4], const float axis[3], float angle)
ViewOpsData * viewops_data_create(bContext *C, const wmEvent *event, const ViewOpsType *nav_type, const bool use_cursor_init)
float normalize_qt(float q[4])
bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d)
int WM_operator_smooth_viewtx_get(const wmOperator *op)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void ED_region_tag_redraw(ARegion *region)
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct)
static void viewroll_apply(ViewOpsData *vod, int x, int y)
wmWindowManager * CTX_wm_manager(const bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
MINLINE void negate_v3(float r[3])
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
@ VIEWOPS_FLAG_ORBIT_SELECT
MINLINE float normalize_v3_v3(float r[3], const float a[3])
static wmOperatorStatus viewroll_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@ VIEWROT_MODAL_SWITCH_MOVE
@ VIEWROT_MODAL_SWITCH_ROTATE
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void view3d_navigate_cancel_fn(bContext *C, wmOperator *op)
void ED_view3d_smooth_view_force_finish(bContext *C, View3D *v3d, ARegion *region)
Dial * BLI_dial_init(const float start_position[2], float threshold)
void view3d_orbit_apply_dyn_ofs(float r_ofs[3], const float ofs_old[3], const float viewquat_old[4], const float viewquat_new[4], const float dyn_ofs[3])
static wmOperatorStatus viewroll_modal(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus viewroll_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_roll(wmOperatorType *ot)
float BLI_dial_angle(Dial *dial, const float current_position[2])
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct)
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)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
ARegion * CTX_wm_region(const bContext *C)
void ED_view3d_smooth_view(bContext *C, View3D *v3d, ARegion *region, int smooth_viewtx, const V3D_SmoothParams *sview)
void view3d_boxview_sync(ScrArea *area, ARegion *region)
float RNA_float_get(PointerRNA *ptr, const char *name)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
static const EnumPropertyItem prop_view_roll_items[]
float angle_wrap_rad(float angle)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eRegionView3D_ViewAxisRoll view_axis_roll
eRegionView3D_Persp persp
eRegionView3D_ViewLock viewlock
struct blender::ViewOpsData::@013213354235237006300365026145043140112021271057 prev
void init_navigation(bContext *C, const wmEvent *event, const ViewOpsType *nav_type, const float dyn_ofs_override[3]=nullptr, const bool use_cursor_init=false)
struct blender::ViewOpsData::@130157306301264131203124134151333300254160116071 init
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct wmOperatorType * type