Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_navigate.h
| Show All 22 Lines | |||||
| struct Main; | struct Main; | ||||
| struct RegionView3D; | struct RegionView3D; | ||||
| struct Scene; | struct Scene; | ||||
| struct ScrArea; | struct ScrArea; | ||||
| struct View3D; | struct View3D; | ||||
| struct bContext; | struct bContext; | ||||
| struct rcti; | struct rcti; | ||||
| struct wmEvent; | struct wmEvent; | ||||
| struct wmKeyMapItem; | |||||
| struct wmOperator; | struct wmOperator; | ||||
| enum eV3D_OpPropFlag { | enum eV3D_OpPropFlag { | ||||
| V3D_OP_PROP_MOUSE_CO = (1 << 0), | V3D_OP_PROP_MOUSE_CO = (1 << 0), | ||||
| V3D_OP_PROP_DELTA = (1 << 1), | V3D_OP_PROP_DELTA = (1 << 1), | ||||
| V3D_OP_PROP_USE_ALL_REGIONS = (1 << 2), | V3D_OP_PROP_USE_ALL_REGIONS = (1 << 2), | ||||
| V3D_OP_PROP_USE_MOUSE_INIT = (1 << 3), | V3D_OP_PROP_USE_MOUSE_INIT = (1 << 3), | ||||
| }; | }; | ||||
| Show All 24 Lines | enum eViewOpsFlag { | ||||
| * when orbiting or switch from orthographic to perspective when auto-perspective is enabled. | * when orbiting or switch from orthographic to perspective when auto-perspective is enabled. | ||||
| * Some operations don't require this (view zoom/pan or NDOF where subtle rotation is common | * Some operations don't require this (view zoom/pan or NDOF where subtle rotation is common | ||||
| * so we don't want it to trigger auto-perspective). */ | * so we don't want it to trigger auto-perspective). */ | ||||
| VIEWOPS_FLAG_PERSP_ENSURE = (1 << 2), | VIEWOPS_FLAG_PERSP_ENSURE = (1 << 2), | ||||
| /** When set, ignore any options that depend on initial cursor location. */ | /** When set, ignore any options that depend on initial cursor location. */ | ||||
| VIEWOPS_FLAG_USE_MOUSE_INIT = (1 << 3), | VIEWOPS_FLAG_USE_MOUSE_INIT = (1 << 3), | ||||
| }; | }; | ||||
| typedef enum eNavType { | |||||
| V3D_ZOOM = 0, | |||||
| V3D_ROTATE, | |||||
| V3D_MOVE, | |||||
| V3D_VIEW_PAN, | |||||
| } eNavType; | |||||
| extern const char *op_idnames[]; | |||||
| /** Generic View Operator Custom-Data */ | /** Generic View Operator Custom-Data */ | ||||
| typedef struct ViewOpsData { | typedef struct ViewOpsData { | ||||
| /** Context pointers (assigned by #viewops_data_create). */ | /** Context pointers (assigned by #viewops_data_create). */ | ||||
| struct Main *bmain; | struct Main *bmain; | ||||
| struct Scene *scene; | struct Scene *scene; | ||||
| struct ScrArea *area; | struct ScrArea *area; | ||||
| struct ARegion *region; | struct ARegion *region; | ||||
| struct View3D *v3d; | struct View3D *v3d; | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | typedef struct ViewOpsData { | ||||
| } curr; | } curr; | ||||
| float reverse; | float reverse; | ||||
| bool axis_snap; /* view rotate only */ | bool axis_snap; /* view rotate only */ | ||||
| /** Use for orbit selection and auto-dist. */ | /** Use for orbit selection and auto-dist. */ | ||||
| float dyn_ofs[3]; | float dyn_ofs[3]; | ||||
| bool use_dyn_ofs; | bool use_dyn_ofs; | ||||
| /** Used for navigation on non view3d operators. */ | |||||
| int modal; | |||||
| int kmi_len; | |||||
| struct wmKeyMapItem *kmi[0]; | |||||
| } ViewOpsData; | } ViewOpsData; | ||||
| /* view3d_navigate.c */ | /* view3d_navigate.c */ | ||||
| bool view3d_location_poll(struct bContext *C); | bool view3d_location_poll(struct bContext *C); | ||||
| bool view3d_rotation_poll(struct bContext *C); | bool view3d_rotation_poll(struct bContext *C); | ||||
| bool view3d_zoom_or_dolly_poll(struct bContext *C); | bool view3d_zoom_or_dolly_poll(struct bContext *C); | ||||
| Show All 39 Lines | |||||
| /* view3d_navigate_fly.c */ | /* view3d_navigate_fly.c */ | ||||
| void fly_modal_keymap(struct wmKeyConfig *keyconf); | void fly_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| void view3d_keymap(struct wmKeyConfig *keyconf); | void view3d_keymap(struct wmKeyConfig *keyconf); | ||||
| void VIEW3D_OT_fly(struct wmOperatorType *ot); | void VIEW3D_OT_fly(struct wmOperatorType *ot); | ||||
| /* view3d_navigate_move.c */ | /* view3d_navigate_move.c */ | ||||
| int viewmove_modal_impl(struct bContext *C, ViewOpsData *vod, const struct wmEvent *event); | |||||
| int viewmove_invoke_impl(ViewOpsData *vod, const struct wmEvent *event); | |||||
| void viewmove_modal_keymap(struct wmKeyConfig *keyconf); | void viewmove_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| void VIEW3D_OT_move(struct wmOperatorType *ot); | void VIEW3D_OT_move(struct wmOperatorType *ot); | ||||
| /* view3d_navigate_ndof.c */ | /* view3d_navigate_ndof.c */ | ||||
| #ifdef WITH_INPUT_NDOF | #ifdef WITH_INPUT_NDOF | ||||
| struct wmNDOFMotionData; | struct wmNDOFMotionData; | ||||
| Show All 14 Lines | |||||
| #endif /* WITH_INPUT_NDOF */ | #endif /* WITH_INPUT_NDOF */ | ||||
| /* view3d_navigate_roll.c */ | /* view3d_navigate_roll.c */ | ||||
| void VIEW3D_OT_view_roll(struct wmOperatorType *ot); | void VIEW3D_OT_view_roll(struct wmOperatorType *ot); | ||||
| /* view3d_navigate_rotate.c */ | /* view3d_navigate_rotate.c */ | ||||
| int viewrotate_modal_impl(struct bContext *C, ViewOpsData *vod, const wmEvent *event); | |||||
| int viewrotate_invoke_impl(ViewOpsData *vod, const struct wmEvent *event); | |||||
| void viewrotate_modal_keymap(struct wmKeyConfig *keyconf); | void viewrotate_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| void VIEW3D_OT_rotate(struct wmOperatorType *ot); | void VIEW3D_OT_rotate(struct wmOperatorType *ot); | ||||
| /* view3d_navigate_smoothview.c */ | /* view3d_navigate_smoothview.c */ | ||||
| /** | /** | ||||
| * Parameters for setting the new 3D Viewport state. | * Parameters for setting the new 3D Viewport state. | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
| /* view3d_navigate_walk.c */ | /* view3d_navigate_walk.c */ | ||||
| void walk_modal_keymap(struct wmKeyConfig *keyconf); | void walk_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| void VIEW3D_OT_walk(struct wmOperatorType *ot); | void VIEW3D_OT_walk(struct wmOperatorType *ot); | ||||
| /* view3d_navigate_zoom.c */ | /* view3d_navigate_zoom.c */ | ||||
| int viewzoom_modal_impl(struct bContext *C, | |||||
| ViewOpsData *vod, | |||||
| const struct wmEvent *event, | |||||
| const bool use_cursor_init); | |||||
| int viewzoom_invoke_impl(struct bContext *C, | |||||
| ViewOpsData *vod, | |||||
| const int delta, | |||||
| const struct wmEvent *event, | |||||
| const int zoom_xy[2], | |||||
| const bool use_cursor_init); | |||||
| void viewzoom_modal_keymap(struct wmKeyConfig *keyconf); | void viewzoom_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| void VIEW3D_OT_zoom(struct wmOperatorType *ot); | void VIEW3D_OT_zoom(struct wmOperatorType *ot); | ||||
| /* view3d_navigate_zoom_border.c */ | /* view3d_navigate_zoom_border.c */ | ||||
| void VIEW3D_OT_zoom_border(struct wmOperatorType *ot); | void VIEW3D_OT_zoom_border(struct wmOperatorType *ot); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||