Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-24 08:56:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-24 08:59:34 +0300
commit4b9ff3cd42be427e478743648e9951bf8c189a04 (patch)
treeb0cb1462a8fdae38df4a0a1067349f3118d56a43 /source/blender/editors/sculpt_paint
parent2e99a74df9ecfa18c4081cdcc82227e2e24f14b1 (diff)
Cleanup: comment blocks, trailing space in comments
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c16
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c14
7 files changed, 22 insertions, 20 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 7e111905883..ab2b2f4b16b 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -940,7 +940,7 @@ static void paint_draw_curve_cursor(Brush *brush, ViewContext *vc)
int j;
PaintCurvePoint *cp_next = cp + 1;
float data[(PAINT_CURVE_NUM_SEGMENTS + 1) * 2];
- /* Use color coding to distinguish handles vs curve segments. */
+ /* Use color coding to distinguish handles vs curve segments. */
draw_bezier_handle_lines(pos, selec_col, &cp->bez);
draw_tri_point(pos, selec_col, pivot_col, &cp->bez.vec[1][0], 10.0f, cp->bez.f2);
draw_rect_point(
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index f0923cf3d28..392f39bbb94 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -745,7 +745,7 @@ static void brush_painter_2d_tex_mapping(ImagePaintState *s,
mapping->ymax = (ymax - ymin) / (float)diameter;
}
else if (mapmode == MTEX_MAP_MODE_3D) {
- /* 3D mapping, just mapping to canvas 0..1 */
+ /* 3D mapping, just mapping to canvas 0..1. */
mapping->xmin = 2.0f * (ipos[0] * invw - 0.5f);
mapping->ymin = 2.0f * (ipos[1] * invh - 0.5f);
mapping->xmax = 2.0f * invw;
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index c83e4de281a..fc08b7cd1b4 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -576,7 +576,9 @@ static Image *project_paint_face_clone_image(const ProjPaintState *ps, int tri_i
return slot ? slot->ima : ps->clone_ima;
}
-/* fast projection bucket array lookup, use the safe version for bound checking */
+/**
+ * Fast projection bucket array lookup, use the safe version for bound checking.
+ */
static int project_bucket_offset(const ProjPaintState *ps, const float projCoSS[2])
{
/* If we were not dealing with screen-space 2D coords we could simple do...
@@ -2969,7 +2971,7 @@ static void project_paint_face_init(const ProjPaintState *ps,
ImBuf *ibuf,
ImBuf **tmpibuf)
{
- /* Projection vars, to get the 3D locations into screen space */
+ /* Projection vars, to get the 3D locations into screen space. */
MemArena *arena = ps->arena_mt[thread_index];
LinkNode **bucketPixelNodes = ps->bucketRect + bucket_index;
LinkNode *bucketFaceNodes = ps->bucketFaces[bucket_index];
@@ -3011,7 +3013,7 @@ static void project_paint_face_init(const ProjPaintState *ps,
rcti bounds_px;
/* Variables for getting UV-space bounds. */
- /* bucket bounds in UV space so we can init pixels only for this face, */
+ /* Bucket bounds in UV space so we can init pixels only for this face. */
float lt_uv_pxoffset[3][2];
float xhalfpx, yhalfpx;
const float ibuf_xf = (float)ibuf->x, ibuf_yf = (float)ibuf->y;
@@ -4516,8 +4518,8 @@ static void project_paint_begin(const bContext *C,
reset_threads = true;
}
- /* really high values could cause problems since it has to allocate a few
- * (ps->buckets_x*ps->buckets_y) sized arrays */
+ /* Really high values could cause problems since it has to allocate a few
+ * `(ps->buckets_x * ps->buckets_y)` sized arrays. */
CLAMP(ps->buckets_x, PROJ_BUCKET_RECT_MIN, PROJ_BUCKET_RECT_MAX);
CLAMP(ps->buckets_y, PROJ_BUCKET_RECT_MIN, PROJ_BUCKET_RECT_MAX);
@@ -5364,7 +5366,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v
float texrgb[3];
float mask;
- /* Extra mask for normal, layer stencil, .. */
+ /* Extra mask for normal, layer stencil, etc. */
float custom_mask = ((float)projPixel->mask) * (1.0f / 65535.0f);
/* Mask texture. */
@@ -5447,7 +5449,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v
}
/* end copy */
- /* validate undo tile, since we will modify t*/
+ /* Validate undo tile, since we will modify it. */
*projPixel->valid = true;
last_partial_redraw_cell = last_projIma->partRedrawRect + projPixel->bb_cell_index;
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 59a5ad63f0e..de01bc3a474 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -541,7 +541,7 @@ static void paint_brush_stroke_add_step(bContext *C,
* It's strange that only texpaint had these guards. */
#if 0
/* special exception here for too high pressure values on first touch in
- * windows for some tablets, then we just skip first touch .. */
+ * windows for some tablets, then we just skip first touch. */
if (tablet && (pressure >= 0.99f) &&
((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) ||
BKE_brush_use_alpha_pressure(pop->s.brush) ||
@@ -1115,7 +1115,7 @@ bool paint_supports_dynamic_tex_coords(Brush *br, ePaintMode mode)
#define PAINT_STROKE_MODAL_CANCEL 1
-/* called in paint_ops.c, on each regeneration of keymaps */
+/* Called in paint_ops.c, on each regeneration of key-maps. */
struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf)
{
static struct EnumPropertyItem modal_items[] = {
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index 0fafd3589fe..7991987ae1f 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -791,7 +791,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
wpaint_prev_create(
&((WPGradient_vertStoreBase *)gesture->user_data.data)->wpp, me->dvert, me->totvert);
- /* on init only, convert face -> vert sel */
+ /* On initialization only, convert face -> vert sel. */
if (me->editflag & ME_EDIT_PAINT_FACE_SEL) {
BKE_mesh_flush_select_from_polys(me);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index e2ee4c9fed3..b39fbe5ba1a 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -977,7 +977,7 @@ typedef struct StrokeCache {
/* Symmetry index between 0 and 7 bit combo 0 is Brush only;
* 1 is X mirror; 2 is Y mirror; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
int symmetry;
- int mirror_symmetry_pass; /* the symmetry pass we are currently on between 0 and 7*/
+ int mirror_symmetry_pass; /* The symmetry pass we are currently on between 0 and 7. */
float true_view_normal[3];
float view_normal[3];
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 219a8303674..2825639bb3d 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -101,9 +101,9 @@ typedef struct UVInitialStroke {
/* custom data for uv smoothing brush */
typedef struct UvSculptData {
- /* Contains the first of each set of coincident uvs.
+ /* Contains the first of each set of coincident UV's.
* These will be used to perform smoothing on and propagate the changes
- * to their coincident uvs */
+ * to their coincident UV's */
UvAdjacencyElement *uv;
/* ...Is what it says */
@@ -121,7 +121,7 @@ typedef struct UvSculptData {
/* timer to be used for airbrush-type brush */
wmTimer *timer;
- /* to determine quickly adjacent uvs */
+ /* to determine quickly adjacent UV's */
UvElementMap *elementMap;
/* uvsmooth Paint for fast reference */
@@ -550,7 +550,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
island_index = element->island;
}
- /* Count 'unique' uvs */
+ /* Count 'unique' UV's */
for (i = 0; i < data->elementMap->totalUVs; i++) {
if (data->elementMap->buf[i].separate &&
(!do_island_optimization || data->elementMap->buf[i].island == island_index)) {
@@ -627,8 +627,8 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
offset2 = uniqueUv[itmp2];
edges[counter].flag = 0;
- /* using an order policy, sort uvs according to address space. This avoids
- * Having two different UvEdges with the same uvs on different positions */
+ /* Using an order policy, sort UV's according to address space.
+ * This avoids having two different UvEdges with the same UV's on different positions. */
if (offset1 < offset2) {
edges[counter].uv1 = offset1;
edges[counter].uv2 = offset2;
@@ -674,7 +674,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
BLI_ghash_free(edgeHash, NULL, NULL);
MEM_freeN(edges);
- /* transfer boundary edge property to uvs */
+ /* transfer boundary edge property to UV's */
if (ts->uv_sculpt_settings & UV_SCULPT_LOCK_BORDERS) {
for (i = 0; i < data->totalUvEdges; i++) {
if (!data->uvedges[i].flag) {