diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 10:19:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 14:04:51 +0300 |
commit | 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch) | |
tree | e7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/editors/sculpt_paint | |
parent | c735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff) |
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
4 files changed, 17 insertions, 12 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 3ac2b65f97a..fe16611a6eb 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -882,7 +882,7 @@ static int grab_clone_modal(bContext *C, wmOperator *op, const wmEvent *event) switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: - case RIGHTMOUSE: // XXX hardcoded + case RIGHTMOUSE: /* XXX hardcoded */ MEM_freeN(op->customdata); return OPERATOR_FINISHED; case MOUSEMOVE: diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 15ecaec5657..75f1e63ebb3 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3054,9 +3054,9 @@ static void project_paint_face_init(const ProjPaintState *ps, lt_uv_pxoffset[2][1] = lt_tri_uv[2][1] - yhalfpx; { - uv1co = lt_uv_pxoffset[0]; // was lt_tri_uv[i1]; - uv2co = lt_uv_pxoffset[1]; // was lt_tri_uv[i2]; - uv3co = lt_uv_pxoffset[2]; // was lt_tri_uv[i3]; + uv1co = lt_uv_pxoffset[0]; /* was lt_tri_uv[i1]; */ + uv2co = lt_uv_pxoffset[1]; /* was lt_tri_uv[i2]; */ + uv3co = lt_uv_pxoffset[2]; /* was lt_tri_uv[i3]; */ v1coSS = ps->screenCoords[lt_vtri[0]]; v2coSS = ps->screenCoords[lt_vtri[1]]; @@ -3414,7 +3414,7 @@ static void project_paint_face_init(const ProjPaintState *ps, } #else UNUSED_VARS(vCo, threaded); -#endif // PROJ_DEBUG_NOSEAMBLEED +#endif /* PROJ_DEBUG_NOSEAMBLEED */ } /** @@ -4221,7 +4221,7 @@ static bool project_paint_winclip(const ProjPaintState *ps, const ProjPaintFaceC (coSS->v1[1] > ps->screenMax[1] && coSS->v2[1] > ps->screenMax[1] && coSS->v3[1] > ps->screenMax[1]))); } -#endif // PROJ_DEBUG_WINCLIP +#endif /* PROJ_DEBUG_WINCLIP */ typedef struct PrepareImageEntry { struct PrepareImageEntry *next, *prev; @@ -4719,7 +4719,12 @@ static bool project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) const float radius = ps->brush_size; /* so we don't have a bucket bounds that is way too small to paint into */ - // if (radius < 1.0f) radius = 1.0f; // this doesn't work yet :/ +#if 0 + /* This doesn't work yet. */ + if (radius < 1.0f) { + radius = 1.0f; + } +#endif min_brush[0] = mval_f[0] - radius; min_brush[1] = mval_f[1] - radius; diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 9bf1911aee8..d5745caa66a 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -57,7 +57,7 @@ #include "sculpt_intern.h" #include <string.h> -//#include <stdio.h> +// #include <stdio.h> #include <stddef.h> /* Brush operators */ @@ -144,7 +144,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) float scalar = RNA_float_get(op->ptr, "scalar"); if (brush) { - // pixel radius + /* pixel radius */ { const int old_size = BKE_brush_size_get(scene, brush); int size = (int)(scalar * old_size); @@ -161,11 +161,11 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) BKE_brush_size_set(scene, brush, size); } - // unprojected radius + /* unprojected radius */ { float unprojected_radius = scalar * BKE_brush_unprojected_radius_get(scene, brush); - if (unprojected_radius < 0.001f) { // XXX magic number + if (unprojected_radius < 0.001f) { /* XXX magic number */ unprojected_radius = 0.001f; } diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 287e1eb03d1..c67a3145be8 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -55,7 +55,7 @@ #include "BKE_subsurf.h" #include "BKE_undo_system.h" -// XXX: Ideally should be no direct call to such low level things. +/* XXX: Ideally should be no direct call to such low level things. */ #include "BKE_subdiv_eval.h" #include "DEG_depsgraph.h" |