diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:19:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:38:48 +0300 |
commit | ffc4c126f5416b04a01653e7a03451797b98aba4 (patch) | |
tree | ac63d70d33aae5ab1666c9c2f62058c9c1eebd5c /source/blender/blenkernel/intern/mask.c | |
parent | f159d49f56cedccd509ee93f5a5fb51f4f39eeb8 (diff) |
Cleanup: move public doc-strings into headers for 'blenkernel'
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index 7b916cb1aae..6f498c5c9e7 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -373,7 +373,6 @@ MaskLayer *BKE_mask_layer_new(Mask *mask, const char *name) return masklay; } -/* NOTE: may still be hidden, caller needs to check. */ MaskLayer *BKE_mask_layer_active(Mask *mask) { return BLI_findlink(&mask->masklayers, mask->masklay_act); @@ -789,12 +788,11 @@ BLI_INLINE void orthogonal_direction_get(const float vec[2], float result[2]) normalize_v2(result); } -/* TODO(sergey): This function will re-calculate loads of stuff again and again - * when differentiating feather points. This might be easily cached - * in the callee function for this case. - */ void BKE_mask_point_normal(MaskSpline *spline, MaskSplinePoint *point, float u, float n[2]) { + /* TODO(sergey): This function will re-calculate loads of stuff again and again + * when differentiating feather points. This might be easily cached + * in the callee function for this case. */ MaskSplinePoint *point_prev, *point_next; @@ -1134,7 +1132,6 @@ MaskSpline *BKE_mask_spline_copy(const MaskSpline *spline) return nspline; } -/* NOTE: Does NOT add to the list. */ MaskLayerShape *BKE_mask_layer_shape_alloc(MaskLayer *masklay, const int frame) { MaskLayerShape *masklay_shape; @@ -1158,8 +1155,6 @@ void BKE_mask_layer_shape_free(MaskLayerShape *masklay_shape) MEM_freeN(masklay_shape); } -/** \brief Free all animation keys for a mask layer - */ void BKE_mask_layer_free_shapes(MaskLayer *masklay) { MaskLayerShape *masklay_shape; @@ -1247,7 +1242,6 @@ void BKE_mask_coord_from_image(Image *image, ImageUser *iuser, float r_co[2], co BKE_mask_coord_from_frame(r_co, co, frame_size); } -/* as above but divide */ void BKE_mask_coord_to_frame(float r_co[2], const float co[2], const float frame_size[2]) { if (frame_size[0] == frame_size[1]) { @@ -1430,8 +1424,6 @@ void BKE_mask_get_handle_point_adjacent(MaskSpline *spline, *r_point_next = mask_spline_point_next(spline, points_array, point); } -/* calculates the tangent of a point by its previous and next - * (ignoring handles - as if its a poly line) */ void BKE_mask_calc_tangent_polyline(MaskSpline *spline, MaskSplinePoint *point, float t[2]) { float tvec_a[2], tvec_b[2]; @@ -1515,11 +1507,6 @@ void BKE_mask_calc_handle_adjacent_interp(MaskSpline *spline, } } -/** - * \brief Resets auto handles even for non-auto bezier points - * - * Useful for giving sane defaults. - */ void BKE_mask_calc_handle_point_auto(MaskSpline *spline, MaskSplinePoint *point, const bool do_recalc_length) @@ -1642,7 +1629,6 @@ static void mask_layer_shape_to_mask_point(BezTriple *bezt, bezt->radius = fp[7]; } -/* these functions match. copy is swapped */ void BKE_mask_layer_shape_from_mask(MaskLayer *masklay, MaskLayerShape *masklay_shape) { int tot = BKE_mask_layer_shape_totvert(masklay); @@ -1698,7 +1684,6 @@ BLI_INLINE void interp_v2_v2v2_flfl( target[1] = s * a[1] + t * b[1]; } -/* linear interpolation only */ void BKE_mask_layer_shape_to_mask_interp(MaskLayer *masklay, MaskLayerShape *masklay_shape_a, MaskLayerShape *masklay_shape_b, @@ -1759,9 +1744,6 @@ MaskLayerShape *BKE_mask_layer_shape_find_frame(MaskLayer *masklay, const int fr return NULL; } -/** - * When returning 2 - the frame isn't found but before/after frames are. - */ int BKE_mask_layer_shape_find_frame_range(MaskLayer *masklay, const float frame, MaskLayerShape **r_masklay_shape_a, @@ -1924,7 +1906,6 @@ static void interp_weights_uv_v2_apply(const float uv[2], r_pt[1] += dvec[0] * uv[1]; } -/* When a new points added - resize all shape-key array. */ void BKE_mask_layer_shape_changed_add(MaskLayer *masklay, int index, bool do_init, @@ -2019,7 +2000,6 @@ void BKE_mask_layer_shape_changed_add(MaskLayer *masklay, } } -/* move array to account for removed point */ void BKE_mask_layer_shape_changed_remove(MaskLayer *masklay, int index, int count) { MaskLayerShape *masklay_shape; @@ -2081,13 +2061,11 @@ static void mask_clipboard_free_ex(bool final_free) } } -/* Free the clipboard. */ void BKE_mask_clipboard_free(void) { mask_clipboard_free_ex(true); } -/* Copy selected visible splines from the given layer to clipboard. */ void BKE_mask_clipboard_copy_from_layer(MaskLayer *mask_layer) { MaskSpline *spline; @@ -2122,13 +2100,11 @@ void BKE_mask_clipboard_copy_from_layer(MaskLayer *mask_layer) } } -/* Check clipboard is empty. */ bool BKE_mask_clipboard_is_empty(void) { return BLI_listbase_is_empty(&mask_clipboard.splines); } -/* Paste the contents of clipboard to given mask layer */ void BKE_mask_clipboard_paste_to_layer(Main *bmain, MaskLayer *mask_layer) { MaskSpline *spline; |