diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_walk.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_walk.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 7aefd173953..751e37f0235 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -65,6 +65,10 @@ /* ensure the target position is one we can reach, see: T45771 */ #define USE_PIXELSIZE_NATIVE_SUPPORT +/* -------------------------------------------------------------------- */ +/** \name Modal Key-map + * \{ */ + /* NOTE: these defines are saved in keymap files, * do not change values but just add new ones */ enum { @@ -173,6 +177,12 @@ void walk_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_assign(keymap, "VIEW3D_OT_walk"); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Internal Walk Structs + * \{ */ + typedef struct WalkTeleport { eWalkTeleportState state; float duration; /* from user preferences */ @@ -283,6 +293,12 @@ typedef struct WalkInfo { } WalkInfo; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Internal Walk Drawing + * \{ */ + /* prototypes */ #ifdef WITH_INPUT_NDOF static void walkApply_ndof(bContext *C, WalkInfo *walk, bool is_confirm); @@ -340,6 +356,12 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *region, voi immUnbindProgram(); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Internal Walk Logic + * \{ */ + static void walk_navigation_mode_set(WalkInfo *walk, eWalkMethod mode) { if (mode == WALK_MODE_FREE) { @@ -598,7 +620,7 @@ static int walkEnd(bContext *C, WalkInfo *walk) if (walk->state == WALK_RUNNING) { return OPERATOR_RUNNING_MODAL; } - else if (walk->state == WALK_CONFIRM) { + if (walk->state == WALK_CONFIRM) { /* Needed for auto_keyframe. */ #ifdef WITH_INPUT_NDOF if (walk->ndof) { @@ -1343,7 +1365,12 @@ static void walkApply_ndof(bContext *C, WalkInfo *walk, bool is_confirm) } #endif /* WITH_INPUT_NDOF */ -/****** walk operator ******/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Walk Operator + * \{ */ + static int walk_invoke(bContext *C, wmOperator *op, const wmEvent *event) { RegionView3D *rv3d = CTX_wm_region_view3d(C); @@ -1438,3 +1465,5 @@ void VIEW3D_OT_walk(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_BLOCKING; } + +/** \} */ |