From 18540f41d78fdf766aec5c99dbc63ef623fc003e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 4 Aug 2019 12:52:01 +1000 Subject: Cleanup: improve comments --- source/blender/editors/interface/interface_templates.c | 7 +++++-- source/blender/editors/space_view3d/view3d_edit.c | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'source/blender/editors') 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]}; -- cgit v1.2.3