[Bf-blender-cvs] [a5f59bffd62] master: Cleanup: use doxy comments

Campbell Barton noreply at git.blender.org
Sun Aug 11 14:42:14 CEST 2019


Commit: a5f59bffd62568922c5001ffbae6f2337a6a4419
Author: Campbell Barton
Date:   Sun Aug 11 22:41:04 2019 +1000
Branches: master
https://developer.blender.org/rBa5f59bffd62568922c5001ffbae6f2337a6a4419

Cleanup: use doxy comments

===================================================================

M	source/blender/editors/space_view3d/view3d_fly.c
M	source/blender/editors/space_view3d/view3d_walk.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 01828824e8d..dbbc7f2a32e 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -146,13 +146,13 @@ typedef struct FlyInfo {
   struct Depsgraph *depsgraph;
   Scene *scene;
 
-  wmTimer *timer; /* needed for redraws */
+  /** Needed for for updating that isn't triggered by input. */
+  wmTimer *timer;
 
   short state;
   bool redraw;
   bool use_precision;
-  /* if the user presses shift they can look about
-   * without moving the direction there looking */
+  /** If the user presses shift they can look about without moving the direction there looking. */
   bool use_freelook;
 
   /**
@@ -163,31 +163,43 @@ typedef struct FlyInfo {
    */
   bool anim_playing;
 
-  int mval[2];         /* latest 2D mouse values */
-  int center_mval[2];  /* center mouse values */
-  float width, height; /* camera viewport dimensions */
+  /** Latest 2D mouse values. */
+  int mval[2];
+  /** Center mouse values. */
+  int center_mval[2];
+  /** Camera viewport dimensions. */
+  float width, height;
 
 #ifdef WITH_INPUT_NDOF
-  wmNDOFMotionData *ndof; /* latest 3D mouse values */
+  /** Latest 3D mouse values. */
+  wmNDOFMotionData *ndof;
 #endif
 
   /* fly state state */
-  float speed;   /* the speed the view is moving per redraw */
-  short axis;    /* Axis index to move along by default Z to move along the view */
-  bool pan_view; /* when true, pan the view instead of rotating */
+  /** The speed the view is moving per redraw. */
+  float speed;
+  /** Axis index to move along by default Z to move along the view. */
+  short axis;
+  /** When true, pan the view instead of rotating. */
+  bool pan_view;
 
   eFlyPanState xlock, zlock;
-  float xlock_momentum, zlock_momentum; /* nicer dynamics */
-  float grid;                           /* world scale 1.0 default */
+  /** Nicer dynamics. */
+  float xlock_momentum, zlock_momentum;
+  /** World scale 1.0 default. */
+  float grid;
 
   /* compare between last state */
-  double time_lastwheel; /* used to accelerate when using the mousewheel a lot */
-  double time_lastdraw;  /* time between draws */
+  /** Used to accelerate when using the mousewheel a lot. */
+  double time_lastwheel;
+  /** Time between draws. */
+  double time_lastdraw;
 
   void *draw_handle_pixel;
 
   /* use for some lag */
-  float dvec_prev[3]; /* old for some lag */
+  /** Keep the previous value to smooth transitions (use lag). */
+  float dvec_prev[3];
 
   struct View3DCameraControl *v3d_camera_control;
 
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 4b2e9d974b9..91c05f5cac6 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -191,7 +191,8 @@ typedef struct WalkInfo {
   struct Depsgraph *depsgraph;
   Scene *scene;
 
-  wmTimer *timer; /* needed for redraws */
+  /** Needed for for updating that isn't triggered by input. */
+  wmTimer *timer;
 
   short state;
   bool redraw;
@@ -204,64 +205,75 @@ typedef struct WalkInfo {
    */
   bool anim_playing;
 
-  int prev_mval[2];   /* previous 2D mouse values */
-  int center_mval[2]; /* center mouse values */
+  /** Previous 2D mouse values. */
+  int prev_mval[2];
+  /** Center mouse values. */
+  int center_mval[2];
+
   int moffset[2];
 
 #ifdef WITH_INPUT_NDOF
-  wmNDOFMotionData *ndof; /* latest 3D mouse values */
+  /** Latest 3D mouse values. */
+  wmNDOFMotionData *ndof;
 #endif
 
   /* walk state state */
-  float base_speed; /* the base speed without run/slow down modifications */
-  float speed;      /* the speed the view is moving per redraw */
-  float grid;       /* world scale 1.0 default */
+  /** The base speed without run/slow down modifications. */
+  float base_speed;
+  /** The speed the view is moving per redraw. */
+  float speed;
+  /** World scale 1.0 default. */
+  float grid;
 
   /* compare between last state */
-  double time_lastdraw; /* time between draws */
+  /** Time between draws. */
+  double time_lastdraw;
 
   void *draw_handle_pixel;
 
   /* use for some lag */
-  float dvec_prev[3]; /* old for some lag */
+  /** Keep the previous value to smooth transitions (use lag). */
+  float dvec_prev[3];
 
-  /* walk/fly */
+  /** Walk/free movement. */
   eWalkMethod navigation_mode;
 
   /* teleport */
   WalkTeleport teleport;
 
-  /* look speed factor - user preferences */
+  /** Look speed factor - user preferences. */
   float mouse_speed;
 
-  /* speed adjustments */
+  /** Speed adjustments. */
   bool is_fast;
   bool is_slow;
 
-  /* mouse reverse */
+  /** Mouse reverse. */
   bool is_reversed;
 
 #ifdef USE_TABLET_SUPPORT
-  /* check if we had a cursor event before */
+  /** Check if we had a cursor event before. */
   bool is_cursor_first;
 
-  /* tablet devices (we can't relocate the cursor) */
+  /** Tablet devices (we can't relocate the cursor). */
   bool is_cursor_absolute;
 #endif
 
-  /* gravity system */
+  /** Gravity system. */
   eWalkGravityState gravity_state;
   float gravity;
 
-  /* height to use in walk mode */
+  /** Height to use in walk mode. */
   float view_height;
 
-  /* counting system to allow movement to continue if a direction (WASD) key is still pressed */
+  /** Counting system to allow movement to continue if a direction (WASD) key is still pressed. */
   int active_directions;
 
   float speed_jump;
-  float jump_height;  /* maximum jump height */
-  float speed_factor; /* to use for fast/slow speeds */
+  /** Maximum jump height. */
+  float jump_height;
+  /** To use for fast/slow speeds. */
+  float speed_factor;
 
   struct SnapObjectContext *snap_context;



More information about the Bf-blender-cvs mailing list