[Bf-blender-cvs] [18540f41d78] master: Cleanup: improve comments

Campbell Barton noreply at git.blender.org
Sun Aug 4 04:59:31 CEST 2019


Commit: 18540f41d78fdf766aec5c99dbc63ef623fc003e
Author: Campbell Barton
Date:   Sun Aug 4 12:52:01 2019 +1000
Branches: master
https://developer.blender.org/rB18540f41d78fdf766aec5c99dbc63ef623fc003e

Cleanup: improve comments

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

M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/space_view3d/view3d_edit.c

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

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 654483c2182..fb8c2f59748 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -4064,8 +4064,11 @@ static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v)
   rna_update_cb(C, cb_v, NULL);
 }
 
-/* still unsure how this call evolves...
- * we use labeltype for defining what curve-channels to show */
+/**
+ * \note Still unsure how this call evolves.
+ *
+ * \param labeltype: Used for defining which curve-channels to show.
+ */
 static void curvemap_buttons_layout(uiLayout *layout,
                                     PointerRNA *ptr,
                                     char labeltype,
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 62673d9bd5a..ff0052c1fd1 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -183,6 +183,10 @@ typedef struct ViewOpsData {
   bool use_dyn_ofs;
 } ViewOpsData;
 
+/**
+ * Size of the sphere being dragged for trackball rotation withing the view bounds.
+ * also affects speed (smaller is faster).
+ */
 #define TRACKBALLSIZE (1.1f)
 
 static void calctrackballvec(const rcti *rect, const int event_xy[2], float r_dir[3])
@@ -190,8 +194,8 @@ static void calctrackballvec(const rcti *rect, const int event_xy[2], float r_di
   const float radius = TRACKBALLSIZE;
   const float t = radius / (float)M_SQRT2;
   const float size[2] = {BLI_rcti_size_x(rect), BLI_rcti_size_y(rect)};
-  /* Aspect correct so dragging in a non-square view doesn't squash the,
-   * so diagonal motion rotates diagonally too. */
+  /* Aspect correct so dragging in a non-square view doesn't squash the direction.
+   * So diagonal motion rotates the same direction the cursor is moving. */
   const float size_min = min_ff(size[0], size[1]);
   const float aspect[2] = {size_min / size[0], size_min / size[1]};



More information about the Bf-blender-cvs mailing list