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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index fc08b7cd1b4..88140460f5b 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -391,7 +391,7 @@ typedef struct ProjPaintState {
float *cavities;
#ifndef PROJ_DEBUG_NOSEAMBLEED
- /** store info about faces, if they are initialized etc*/
+ /** Store info about faces, if they are initialized etc. */
ushort *faceSeamFlags;
/** save the winding of the face in uv space,
* helps as an extra validation step for seam detection. */
@@ -1073,7 +1073,7 @@ static bool pixel_bounds_uv(const float uv_quad[4][2],
bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1;
bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1;
- /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/
+ // printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);
/* face uses no UV area when quantized to pixels? */
return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? false : true;
@@ -1103,7 +1103,7 @@ static bool pixel_bounds_array(
bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1;
bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1;
- /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/
+ // printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);
/* face uses no UV area when quantized to pixels? */
return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? false : true;
@@ -1774,7 +1774,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps,
}
if (angle_cos <= ps->normal_angle__cos) {
- /* outsize the normal limit*/
+ /* Outsize the normal limit. */
return 0.0f;
}
if (angle_cos < ps->normal_angle_inner__cos) {
@@ -1878,7 +1878,7 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps,
int x_tile, y_tile;
int x_round, y_round;
int tile_offset;
- /* volatile is important here to ensure pending check is not optimized away by compiler*/
+ /* Volatile is important here to ensure pending check is not optimized away by compiler. */
volatile int tile_index;
ProjPaintImage *projima = tinf->pjima;
@@ -2063,7 +2063,7 @@ static bool line_clip_rect2f(const rctf *cliprect,
return false;
}
- /* this is a single point (or close to)*/
+ /* This is a single point (or close to). */
if (fabsf(l1[0] - l2[0]) < PROJ_PIXEL_TOLERANCE) {
if (BLI_rctf_isect_pt_v(rect, l1)) {
copy_v2_v2(l1_clip, l1);
@@ -2090,7 +2090,7 @@ static bool line_clip_rect2f(const rctf *cliprect,
return false;
}
- /* this is a single point (or close to)*/
+ /* This is a single point (or close to). */
if (fabsf(l1[1] - l2[1]) < PROJ_PIXEL_TOLERANCE) {
if (BLI_rctf_isect_pt_v(rect, l1)) {
copy_v2_v2(l1_clip, l1);
@@ -2678,7 +2678,7 @@ static void project_bucket_clip_face(const bool is_ortho,
/* calc center */
float cent[2] = {0.0f, 0.0f};
- /*float up[2] = {0.0f, 1.0f};*/
+ // float up[2] = {0.0f, 1.0f};
bool doubles;
(*tot) = 0;
@@ -3065,7 +3065,7 @@ static void project_paint_face_init(const ProjPaintState *ps,
v2coSS = ps->screenCoords[lt_vtri[1]];
v3coSS = ps->screenCoords[lt_vtri[2]];
- /* This function gives is a concave polyline in UV space from the clipped tri*/
+ /* This function gives is a concave polyline in UV space from the clipped tri. */
project_bucket_clip_face(is_ortho,
is_flip_object,
clip_rect,
@@ -4430,7 +4430,7 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps,
}
}
- /* build an array of images we use*/
+ /* Build an array of images we use. */
if (ps->is_shared_user == false) {
project_paint_build_proj_ima(ps, arena, &used_images);
}
@@ -4770,7 +4770,7 @@ static bool project_bucket_iter_next(ProjPaintState *ps,
BLI_assert(bucket_y >= ps->bucketMin[1] && bucket_y < ps->bucketMax[1]);
if (bucket_x >= ps->bucketMin[0] && bucket_x < ps->bucketMax[0]) {
- /* use bucket_bounds for project_bucket_isect_circle and project_bucket_init*/
+ /* Use bucket_bounds for #project_bucket_isect_circle and #project_bucket_init. */
project_bucket_bounds(ps, bucket_x, bucket_y, bucket_bounds);
if ((ps->source != PROJ_SRC_VIEW) ||
@@ -5356,7 +5356,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v
dist_sq = len_squared_v2v2(projPixel->projCoSS, pos);
- /*if (dist < radius) {*/ /* correct but uses a sqrtf */
+ /* Faster alternative to `dist < radius` without a #sqrtf. */
if (dist_sq <= brush_radius_sq) {
dist = sqrtf(dist_sq);
@@ -5814,7 +5814,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int
ps->is_maskbrush = (brush->mask_mtex.tex) ? true : false;
}
else {
- /* brush may be NULL*/
+ /* Brush may be NULL. */
ps->do_masking = false;
ps->is_texbrush = false;
ps->is_maskbrush = false;