diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 16:08:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 17:43:40 +0300 |
commit | 9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 (patch) | |
tree | 63f1007a5262b4d6f1c1a96734c521d836eb6fc6 /source/blender/editors/sculpt_paint/paint_image_proj.c | |
parent | 05f970847e12ce30e8c4c624677d94ae239ce2bc (diff) |
Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 2437e0d1939..f84c847c1fb 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -930,7 +930,7 @@ static bool project_bucket_point_occluded(const ProjPaintState *ps, } if (isect_ret >= 1) { - /* TODO - we may want to cache the first hit, + /* TODO: we may want to cache the first hit, * it is not possible to swap the face order in the list anymore */ return true; } @@ -1661,7 +1661,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps, const MLoopTri *lt_other = &ps->mlooptri_eval[tri_index]; const float *lt_other_tri_uv[3] = {PS_LOOPTRI_AS_UV_3(ps->poly_to_loop_uv, lt_other)}; - /* BKE_image_acquire_ibuf - TODO - this may be slow */ + /* #BKE_image_acquire_ibuf - TODO: this may be slow. */ uchar rgba_ub[4]; float rgba_f[4]; @@ -1959,7 +1959,7 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps, const float *lt_other_tri_uv[3] = { PS_LOOPTRI_AS_UV_3(ps->poly_to_loop_uv_clone, lt_other)}; - /* BKE_image_acquire_ibuf - TODO - this may be slow */ + /* #BKE_image_acquire_ibuf - TODO: this may be slow. */ if (ibuf->rect_float) { if (ibuf_other->rect_float) { /* from float to float */ @@ -3160,7 +3160,7 @@ static void project_paint_face_init(const ProjPaintState *ps, //#endif } -#if 0 /* TODO - investigate why this doesn't work sometimes! it should! */ +#if 0 /* TODO: investigate why this doesn't work sometimes! it should! */ /* no intersection for this entire row, * after some intersection above means we can quit now */ if (has_x_isect == 0 && has_isect) { @@ -3401,7 +3401,7 @@ static void project_paint_face_init(const ProjPaintState *ps, } } -# if 0 /* TODO - investigate why this doesn't work sometimes! it should! */ +# if 0 /* TODO: investigate why this doesn't work sometimes! it should! */ /* no intersection for this entire row, * after some intersection above means we can quit now */ if (has_x_isect == 0 && has_isect) { @@ -3432,8 +3432,8 @@ static void project_paint_bucket_bounds(const ProjPaintState *ps, { /* divide by bucketWidth & bucketHeight so the bounds are offset in bucket grid units */ - /* XXX: the offset of 0.5 is always truncated to zero and the offset of 1.5f - * is always truncated to 1, is this really correct?? - jwilkins */ + /* XXX(jwilkins ): the offset of 0.5 is always truncated to zero and the offset of 1.5f + * is always truncated to 1, is this really correct? */ /* these offsets of 0.5 and 1.5 seem odd but they are correct */ bucketMin[0] = @@ -3553,18 +3553,18 @@ static void project_bucket_init(const ProjPaintState *ps, ps->bucketFlags[bucket_index] |= PROJ_BUCKET_INIT; } -/* We want to know if a bucket and a face overlap in screen-space +/* We want to know if a bucket and a face overlap in screen-space. * - * Note, if this ever returns false positives its not that bad, since a face in the bounding area + * NOTE: if this ever returns false positives its not that bad, since a face in the bounding area * will have its pixels calculated when it might not be needed later, (at the moment at least) - * obviously it shouldn't have bugs though */ + * obviously it shouldn't have bugs though. */ static bool project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucket_y, const MLoopTri *lt) { - /* TODO - replace this with a trickier method that uses side-of-line for all + /* TODO: replace this with a trickier method that uses side-of-line for all * #ProjPaintState.screenCoords edges against the closest bucket corner. */ const int lt_vtri[3] = {PS_LOOPTRI_AS_VERT_INDEX_3(ps, lt)}; rctf bucket_bounds; @@ -3611,7 +3611,7 @@ static bool project_bucket_face_isect(ProjPaintState *ps, } /* Add faces to the bucket but don't initialize its pixels - * TODO - when painting occluded, sort the faces on their min-Z + * TODO: when painting occluded, sort the faces on their min-Z * and only add faces that faces that are not occluded */ static void project_paint_delayed_face_init(ProjPaintState *ps, const MLoopTri *lt, @@ -3824,7 +3824,7 @@ static void proj_paint_state_screen_coords_init(ProjPaintState *ps, const int di minmax_v2v2_v2(ps->screenMin, ps->screenMax, projScreenCo); } else { - /* TODO - deal with cases where 1 side of a face goes behind the view ? + /* TODO: deal with cases where 1 side of a face goes behind the view ? * * After some research this is actually very tricky, only option is to * clip the derived mesh before painting, which is a Pain */ @@ -4696,7 +4696,7 @@ static bool project_image_refresh_tagged(ProjPaintState *ps) /* look over each bound cell */ for (i = 0; i < PROJ_BOUNDBOX_SQUARED; i++) { pr = &(projIma->partRedrawRect[i]); - if (pr->x2 != -1) { /* TODO - use 'enabled' ? */ + if (pr->x2 != -1) { /* TODO: use 'enabled' ? */ set_imapaintpartial(pr); imapaint_image_update(NULL, projIma->ima, projIma->ibuf, &projIma->iuser, true); redraw = 1; @@ -5393,7 +5393,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v samplecos[2] = 0.0f; } - /* note, for clone and smear, + /* NOTE: for clone and smear, * we only use the alpha, could be a special function */ BKE_brush_sample_tex_3d(ps->scene, brush, samplecos, texrgba, thread_index, pool); |