diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-15 15:24:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-15 15:30:31 +0300 |
commit | b8e8c0e325d213f2dcf4adad5506989fa224716e (patch) | |
tree | adb3d7fa8735426ea856a929f562655b2eaf64cb /source/blender/editors/space_view3d/view3d_fly.c | |
parent | 4226ee0b71fec6f08897dacf3d6632526618acca (diff) |
Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_fly.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_fly.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index b27de9d70c2..69f32c8eada 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -92,11 +92,12 @@ typedef enum eFlyPanState { /* disabled */ FLY_AXISLOCK_STATE_OFF = 0, - /* enabled but not checking because mouse hasn't moved outside the margin since locking was checked an not needed - * when the mouse moves, locking is set to 2 so checks are done. */ + /* enabled but not checking because mouse hasn't moved outside the margin since locking was + * checked an not needed when the mouse moves, locking is set to 2 so checks are done. */ FLY_AXISLOCK_STATE_IDLE = 1, - /* mouse moved and checking needed, if no view altering is done its changed back to #FLY_AXISLOCK_STATE_IDLE */ + /* mouse moved and checking needed, + * if no view altering is done its changed back to #FLY_AXISLOCK_STATE_IDLE */ FLY_AXISLOCK_STATE_ACTIVE = 2 } eFlyPanState; @@ -533,7 +534,8 @@ static void flyEvent(bContext *C, wmOperator *op, FlyInfo *fly, const wmEvent *e time_wheel = (float)(time_currwheel - fly->time_lastwheel); fly->time_lastwheel = time_currwheel; /* Mouse wheel delays range from (0.5 == slow) to (0.01 == fast) */ - time_wheel = 1.0f + (10.0f - (20.0f * min_ff(time_wheel, 0.5f))); /* 0-0.5 -> 0-5.0 */ + /* 0-0.5 -> 0-5.0 */ + time_wheel = 1.0f + (10.0f - (20.0f * min_ff(time_wheel, 0.5f))); if (fly->speed < 0.0f) { fly->speed = 0.0f; @@ -557,7 +559,8 @@ static void flyEvent(bContext *C, wmOperator *op, FlyInfo *fly, const wmEvent *e time_currwheel = PIL_check_seconds_timer(); time_wheel = (float)(time_currwheel - fly->time_lastwheel); fly->time_lastwheel = time_currwheel; - time_wheel = 1.0f + (10.0f - (20.0f * min_ff(time_wheel, 0.5f))); /* 0-0.5 -> 0-5.0 */ + /* 0-0.5 -> 0-5.0 */ + time_wheel = 1.0f + (10.0f - (20.0f * min_ff(time_wheel, 0.5f))); if (fly->speed > 0.0f) { fly->speed = 0; @@ -577,7 +580,8 @@ static void flyEvent(bContext *C, wmOperator *op, FlyInfo *fly, const wmEvent *e /* implement WASD keys, * comments only for 'forward '*/ case FLY_MODAL_DIR_FORWARD: - if (fly->axis == 2 && fly->speed < 0.0f) { /* reverse direction stops, tap again to continue */ + if (fly->axis == 2 && fly->speed < 0.0f) { + /* reverse direction stops, tap again to continue */ fly->axis = -1; } else { @@ -696,14 +700,17 @@ static int flyApply(bContext *C, FlyInfo *fly) */ RegionView3D *rv3d = fly->rv3d; - float mat[3][3]; /* 3x3 copy of the view matrix so we can move along the view axis */ - float dvec[3] = {0, 0, 0}; /* this is the direction that's added to the view offset per redraw */ + /* 3x3 copy of the view matrix so we can move along the view axis */ + float mat[3][3]; + /* this is the direction that's added to the view offset per redraw */ + float dvec[3] = {0, 0, 0}; /* Camera Uprighting variables */ float moffset[2]; /* mouse offset from the views center */ float tmp_quat[4]; /* used for rotating the view */ - int xmargin, ymargin; /* x and y margin are define the safe area where the mouses movement wont rotate the view */ + /* x and y margin are define the safe area where the mouses movement wont rotate the view */ + int xmargin, ymargin; #ifdef NDOF_FLY_DEBUG { @@ -765,7 +772,10 @@ static int flyApply(bContext *C, FlyInfo *fly) #endif time_current = PIL_check_seconds_timer(); time_redraw = (float)(time_current - fly->time_lastdraw); - time_redraw_clamped = min_ff(0.05f, time_redraw); /* clamp redraw time to avoid jitter in roll correction */ + + /* clamp redraw time to avoid jitter in roll correction */ + time_redraw_clamped = min_ff(0.05f, time_redraw); + fly->time_lastdraw = time_current; /* Scale the time to use shift to scale the speed down- just like @@ -855,7 +865,8 @@ static int flyApply(bContext *C, FlyInfo *fly) fly->zlock_momentum += FLY_ZUP_CORRECT_ACCEL; } else { - fly->zlock = FLY_AXISLOCK_STATE_IDLE; /* don't check until the view rotates again */ + /* don't check until the view rotates again */ + fly->zlock = FLY_AXISLOCK_STATE_IDLE; fly->zlock_momentum = 0.0f; } } |