Blender
V3.3
|
#include "BLI_math.h"
#include "BKE_context.h"
#include "WM_api.h"
#include "RNA_access.h"
#include "ED_screen.h"
#include "view3d_intern.h"
#include "view3d_navigate.h"
Go to the source code of this file.
Functions | |
View Rotate Operator | |
void | viewrotate_modal_keymap (wmKeyConfig *keyconf) |
static void | viewrotate_apply_snap (ViewOpsData *vod) |
static void | viewrotate_apply (ViewOpsData *vod, const int event_xy[2]) |
static int | viewrotate_modal (bContext *C, wmOperator *op, const wmEvent *event) |
static int | viewrotate_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static void | viewrotate_cancel (bContext *C, wmOperator *op) |
void | VIEW3D_OT_rotate (wmOperatorType *ot) |
void VIEW3D_OT_rotate | ( | wmOperatorType * | ot | ) |
Definition at line 439 of file view3d_navigate_rotate.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_XY, ot, wmOperatorType::poll, V3D_OP_PROP_USE_MOUSE_INIT, view3d_operator_properties_common(), view3d_rotation_poll(), viewrotate_cancel(), viewrotate_invoke(), and viewrotate_modal().
Referenced by view3d_operatortypes().
|
static |
Definition at line 189 of file view3d_navigate_rotate.c.
References angle(), angle_normalized_v3v3(), angle_wrap_rad(), axis_angle_to_quat(), axis_angle_to_quat_single(), ViewOpsData::axis_snap, calctrackballvec(), copy_qt_qt(), copy_v3_v3(), cross_v3_v3v3(), ViewOpsData::curr, ViewOpsData::depsgraph, dot_v3v3(), ED_region_tag_redraw(), ED_view3d_camera_lock_sync(), ViewOpsData::event_xy, ViewOpsData::event_xy_offset, fabsf, float(), ViewOpsData::init, interp_v3_v3v3(), invert_m3_m3(), len_squared_v3v3(), len_v3(), M_PI, mul_qt_qtqt(), negate_v3(), normalize_qt(), ViewOpsData::prev, q1, ViewOpsData::quat, quat_to_mat3(), ViewOpsData::region, ViewOpsData::reverse, ViewOpsData::rv3d, RV3D_VIEW_USER, sub_v3_v3v3(), ViewOpsData::trackvec, USER_TRACKBALL, ViewOpsData::v3d, V3D_OP_TRACKBALLSIZE, RegionView3D::view, ViewOpsData::viewquat, RegionView3D::viewquat, viewrotate_apply_dyn_ofs(), viewrotate_apply_snap(), and ARegion::winrct.
Referenced by viewrotate_invoke(), and viewrotate_modal().
|
static |
Definition at line 79 of file view3d_navigate_rotate.c.
References angle(), angle_normalized_v3v3(), angle_v3v3(), axis_angle_to_quat(), axis_limit(), copy_qt_qt(), copy_v3_v3(), ViewOpsData::curr, DEG2RADF, ED_view3d_quat_to_axis_view_and_reset_quat(), ViewOpsData::init, invert_qt_normalized(), invert_qt_qt_normalized(), mul_qt_qtqt(), mul_qt_v3(), normalize_qt(), normalize_v3(), OB_NEGZ, OB_POSY, ViewOpsData::persp, RegionView3D::persp, rotation_between_vecs_to_quat(), ViewOpsData::rv3d, RV3D_ORTHO, RV3D_PERSP, RV3D_VIEW_IS_AXIS, USER_AUTOPERSP, vec_to_quat(), RegionView3D::view, RegionView3D::view_axis_roll, ViewOpsData::viewquat, RegionView3D::viewquat, viewrotate_apply_dyn_ofs(), x, y, and z.
Referenced by viewrotate_apply().
|
static |
Definition at line 433 of file view3d_navigate_rotate.c.
References C, wmOperator::customdata, NULL, and viewops_data_free().
Referenced by VIEW3D_OT_rotate().
|
static |
Definition at line 386 of file view3d_navigate_rotate.c.
References C, copy_v2_v2_int(), wmOperator::customdata, ED_view3d_smooth_view_force_finish(), ELEM, wmEvent::flag, MOUSEPAN, MOUSEROTATE, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::prev_xy, wmOperator::ptr, ViewOpsData::region, RNA_boolean_get(), wmEvent::type, ViewOpsData::v3d, viewops_data_create(), viewops_data_free(), viewops_flag_from_prefs(), VIEWOPS_FLAG_PERSP_ENSURE, VIEWOPS_FLAG_USE_MOUSE_INIT, viewrotate_apply(), WM_event_add_modal_handler(), and WM_EVENT_SCROLL_INVERT.
Referenced by VIEW3D_OT_rotate().
|
static |
Definition at line 323 of file view3d_navigate_rotate.c.
References ViewOpsData::axis_snap, C, CTX_wm_manager(), wmOperator::customdata, ED_screen_animation_playing(), ED_view3d_camera_lock_autokey(), ED_view3d_camera_lock_undo_push(), ViewOpsData::event_type, EVT_MODAL_MAP, ViewOpsData::init, KM_RELEASE, MOUSEMOVE, wmOperatorType::name, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, ViewOpsData::persp, RegionView3D::persp, ret, ViewOpsData::rv3d, wmOperator::type, wmEvent::type, ViewOpsData::v3d, wmEvent::val, VIEW_APPLY, VIEW_CONFIRM, VIEW_MODAL_CONFIRM, VIEW_PASS, viewops_data_free(), VIEWROT_MODAL_AXIS_SNAP_DISABLE, VIEWROT_MODAL_AXIS_SNAP_ENABLE, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ZOOM, viewrotate_apply(), WM_OP_INVOKE_DEFAULT, WM_operator_name_call(), and wmEvent::xy.
Referenced by VIEW3D_OT_rotate().
void viewrotate_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 24 of file view3d_navigate_rotate.c.
References EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, KM_ANY, KM_PRESS, LEFTMOUSE, wmKeyMap::modal_items, NULL, VIEW_MODAL_CONFIRM, VIEWROT_MODAL_AXIS_SNAP_DISABLE, VIEWROT_MODAL_AXIS_SNAP_ENABLE, VIEWROT_MODAL_SWITCH_MOVE, VIEWROT_MODAL_SWITCH_ZOOM, WM_modalkeymap_add_item(), WM_modalkeymap_assign(), WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by view3d_keymap().