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-02-05 08:23:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-05 08:23:34 +0300
commit17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch)
tree8a164422f7eb7d3aa9f7473c19c80da535c29a05 /source/blender/editors/sculpt_paint
parentb62b923f544fa1df0aecd56f3568dd5185601306 (diff)
Cleanup: correct spelling 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_proj.c56
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c11
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_face_set.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_filter_mesh.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_pose.c2
8 files changed, 42 insertions, 39 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 550913fc8af..7eb08cbabac 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1755,7 +1755,7 @@ static void paint_cursor_cursor_draw_3d_view_brush_cursor_active(PaintCursorCont
else if (brush->cloth_force_falloff_type == BRUSH_CLOTH_FORCE_FALLOFF_RADIAL &&
brush->cloth_simulation_area_type == BRUSH_CLOTH_SIMULATION_AREA_LOCAL) {
/* Display the simulation limits if sculpting outside them. */
- /* This does not makes much sense of plane falloff as the falloff is infinte or global. */
+ /* This does not makes much sense of plane falloff as the falloff is infinite or global. */
if (len_v3v3(ss->cache->true_location, ss->cache->true_initial_location) >
ss->cache->radius * (1.0f + brush->cloth_sim_limit)) {
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 27726b8370e..5330e85c732 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -138,7 +138,7 @@ BLI_INLINE uchar f_to_char(const float val)
#ifndef PROJ_DEBUG_NOSEAMBLEED
/* projectFaceSeamFlags options */
-//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, backfacing or occluded */
+//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, back-facing or occluded. */
//#define PROJ_FACE_INIT (1<<1) /* When we have initialized the faces data */
/* If this face has a seam on any of its edges. */
@@ -150,7 +150,7 @@ BLI_INLINE uchar f_to_char(const float val)
# define PROJ_FACE_NOSEAM1 (1 << 5)
# define PROJ_FACE_NOSEAM2 (1 << 6)
-/* If the seam is completely initialized, including adjecent seams. */
+/* If the seam is completely initialized, including adjacent seams. */
# define PROJ_FACE_SEAM_INIT0 (1 << 8)
# define PROJ_FACE_SEAM_INIT1 (1 << 9)
# define PROJ_FACE_SEAM_INIT2 (1 << 10)
@@ -294,7 +294,7 @@ typedef struct ProjPaintState {
/** verts projected into floating point screen space. */
float (*screenCoords)[4];
- /** 2D bounds for mesh verts on the screen's plane (screenspace). */
+ /** 2D bounds for mesh verts on the screen's plane (screen-space). */
float screenMin[2];
float screenMax[2];
/** Calculated from screenMin & screenMax. */
@@ -310,10 +310,10 @@ typedef struct ProjPaintState {
bool do_stencil_brush;
bool do_material_slots;
- /** Use raytraced occlusion? - ortherwise will paint right through to the back. */
+ /** Use ray-traced occlusion? - otherwise will paint right through to the back. */
bool do_occlude;
/** ignore faces with normals pointing away,
- * skips a lot of raycasts if your normals are correctly flipped. */
+ * skips a lot of ray-casts if your normals are correctly flipped. */
bool do_backfacecull;
/** mask out pixels based on their normals. */
bool do_mask_normal;
@@ -579,7 +579,7 @@ static Image *project_paint_face_clone_image(const ProjPaintState *ps, int tri_i
/* 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 screenspace 2D coords we could simple do...
+ /* If we were not dealing with screen-space 2D coords we could simple do...
* ps->bucketRect[x + (y*ps->buckets_y)] */
/* please explain?
@@ -887,8 +887,8 @@ static int project_paint_occlude_ptv_clip(const float pt[3],
return -1;
}
-/* Check if a screenspace location is occluded by any other faces
- * check, pixelScreenCo must be in screenspace, its Z-Depth only needs to be used for comparison
+/* Check if a screen-space location is occluded by any other faces
+ * check, pixelScreenCo must be in screen-space, its Z-Depth only needs to be used for comparison
* and doesn't need to be correct in relation to X and Y coords
* (this is the case in perspective view) */
static bool project_bucket_point_occluded(const ProjPaintState *ps,
@@ -1514,10 +1514,10 @@ static void project_face_seams_init(const ProjPaintState *ps,
}
#endif // PROJ_DEBUG_NOSEAMBLEED
-/* Converts a UV location to a 3D screenspace location
+/* Converts a UV location to a 3D screen-space location
* Takes a 'uv' and 3 UV coords, and sets the values of pixelScreenCo
*
- * This is used for finding a pixels location in screenspace for painting */
+ * This is used for finding a pixels location in screen-space for painting */
static void screen_px_from_ortho(const float uv[2],
const float v1co[3],
const float v2co[3],
@@ -1537,7 +1537,7 @@ static void screen_px_from_ortho(const float uv[2],
static void screen_px_from_persp(const float uv[2],
const float v1co[4],
const float v2co[4],
- const float v3co[4], /* screenspace coords */
+ const float v3co[4], /* screen-space coords */
const float uv1co[2],
const float uv2co[2],
const float uv3co[2],
@@ -1923,7 +1923,7 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps,
projPixel->newColor.uint = 0;
}
- /* screenspace unclamped, we could keep its z and w values but don't need them at the moment */
+ /* Screen-space unclamped, we could keep its z and w values but don't need them at the moment. */
if (ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) {
copy_v3_v3(projPixel->worldCoSS, world_spaceCo);
}
@@ -2304,14 +2304,14 @@ static bool project_bucket_isect_circle(const float cent[2],
return false;
}
-/* Note for rect_to_uvspace_ortho() and rect_to_uvspace_persp()
+/* Note for #rect_to_uvspace_ortho() and #rect_to_uvspace_persp()
* in ortho view this function gives good results when bucket_bounds are outside the triangle
* however in some cases, perspective view will mess up with faces
- * that have minimal screenspace area (viewed from the side).
+ * that have minimal screen-space area (viewed from the side).
*
* for this reason its not reliable in this case so we'll use the Simple Barycentric'
- * funcs that only account for points inside the triangle.
- * however switching back to this for ortho is always an option */
+ * functions that only account for points inside the triangle.
+ * however switching back to this for ortho is always an option. */
static void rect_to_uvspace_ortho(const rctf *bucket_bounds,
const float *v1coSS,
@@ -2517,8 +2517,8 @@ static void project_bucket_clip_face(const bool is_ortho,
flip = (((line_point_side_v2(v1coSS, v2coSS, v3coSS) > 0.0f) != is_flip_object) !=
(line_point_side_v2(uv1co, uv2co, uv3co) > 0.0f));
- /* all screenspace points are inside the bucket bounding box,
- * this means we don't need to clip and can simply return the UVs */
+ /* All screen-space points are inside the bucket bounding box,
+ * this means we don't need to clip and can simply return the UVs. */
if (flip) { /* facing the back? */
copy_v2_v2(bucket_bounds_uv[0], uv3co);
copy_v2_v2(bucket_bounds_uv[1], uv2co);
@@ -2635,7 +2635,7 @@ static void project_bucket_clip_face(const bool is_ortho,
(line_point_side_v2(uv1co, uv2co, uv3co) > 0.0f));
if (inside_face_flag == ISECT_ALL4) {
- /* bucket is totally inside the screenspace face, we can safely use weights */
+ /* Bucket is totally inside the screen-space face, we can safely use weights. */
if (is_ortho) {
rect_to_uvspace_ortho(
@@ -2656,7 +2656,7 @@ static void project_bucket_clip_face(const bool is_ortho,
* The 2 cases above are where the face is inside the bucket
* or the bucket is inside the face.
*
- * we need to make a convex polyline from the intersection between the screenspace face
+ * we need to make a convex poly-line from the intersection between the screen-space face
* and the bucket bounds.
*
* There are a number of ways this could be done, currently it just collects all
@@ -2997,7 +2997,7 @@ static void project_paint_face_init(const ProjPaintState *ps,
/* vert co screen-space, these will be assigned to lt_vtri[0-2] */
const float *v1coSS, *v2coSS, *v3coSS;
- /* vertex screenspace coords */
+ /* Vertex screen-space coords. */
const float *vCo[3];
float w[3], wco[3];
@@ -3007,9 +3007,9 @@ static void project_paint_face_init(const ProjPaintState *ps,
float pixelScreenCo[4];
bool do_3d_mapping = ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D;
- /* ispace bounds */
+ /* Image-space bounds. */
rcti bounds_px;
- /* vars for getting uvspace bounds */
+ /* Variables for getting UV-space bounds. */
/* bucket bounds in UV space so we can init pixels only for this face, */
float lt_uv_pxoffset[3][2];
@@ -3207,10 +3207,10 @@ static void project_paint_face_init(const ProjPaintState *ps,
/* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in perspective view */
float insetCos[3][3];
- /* vertex screenspace coords */
+ /* Vertex screen-space coords. */
const float *vCoSS[3];
- /* Store the screenspace coords of the face,
+ /* Store the screen-space coords of the face,
* clipped by the bucket's screen aligned rectangle. */
float bucket_clip_edges[2][2];
float edge_verts_inset_clip[2][3];
@@ -3419,7 +3419,7 @@ static void project_paint_face_init(const ProjPaintState *ps,
}
/**
- * Takes floating point screenspace min/max and
+ * Takes floating point screen-space min/max and
* returns int min/max to be used as indices for ps->bucketRect, ps->bucketFlags
*/
static void project_paint_bucket_bounds(const ProjPaintState *ps,
@@ -3888,7 +3888,7 @@ static void proj_paint_state_cavity_init(ProjPaintState *ps)
float no[3];
mul_v3_fl(edges[a], 1.0f / counter[a]);
normal_short_to_float_v3(no, mv->no);
- /* augment the diffe*/
+ /* Augment the difference. */
cavities[a] = saacos(10.0f * dot_v3v3(no, edges[a])) * (float)M_1_PI;
}
else {
@@ -4308,7 +4308,7 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps,
slot_last = slot;
}
- /* don't allow using the same inage for painting and stencilling */
+ /* Don't allow using the same image for painting and stenciling. */
if (slot->ima == ps->stencil_ima) {
/* Delay continuing the loop until after loop_uvs and bleed faces are initialized.
* While this shouldn't be used, face-winding reads all polys.
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 8eb2ebd0f19..8fd5759d695 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -168,8 +168,11 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot)
/** \name Sample Weight Operator
* \{ */
-/* sets wp->weight to the closest weight value to vertex */
-/* note: we cant sample frontbuf, weight colors are interpolated too unpredictable */
+/**
+ * Sets wp->weight to the closest weight value to vertex.
+ *
+ * \note we can't sample front-buffer, weight colors are interpolated too unpredictable.
+ */
static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
@@ -201,7 +204,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even
}
else if (ED_mesh_pick_face(
C, vc.obact, event->mval, ED_MESH_PICK_DEFAULT_FACE_DIST, &index)) {
- /* this relies on knowning the internal worksings of ED_mesh_pick_face_vert() */
+ /* This relies on knowing the internal workings of #ED_mesh_pick_face_vert() */
BKE_report(
op->reports, RPT_WARNING, "The modifier used does not support deformed locations");
}
@@ -604,7 +607,7 @@ static void gradientVert_update(WPGradient_userData *grad_data, int index)
Mesh *me = grad_data->me;
WPGradient_vertStore *vs = &grad_data->vert_cache->elem[index];
- /* Optionally restrict to assigned verices only. */
+ /* Optionally restrict to assigned vertices only. */
if (grad_data->use_vgroup_restrict && ((vs->flag & VGRAD_STORE_DW_EXIST) == 0)) {
return;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 410b83217b4..a53c2efed06 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -8993,7 +8993,7 @@ void SCULPT_fake_neighbors_ensure(Sculpt *sd, Object *ob, const float max_dist)
for (int i = 0; i < totvert; i++) {
const int from_v = i;
- /* This vertex does not have a fake neighbor yet, seach one for it. */
+ /* This vertex does not have a fake neighbor yet, search one for it. */
if (ss->fake_neighbors.fake_neighbor_index[from_v] == FAKE_NEIGHBOR_NONE) {
const int to_v = SCULPT_fake_neighbor_search(sd, ob, from_v, max_dist);
if (to_v != -1) {
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c
index 1fba958d695..20d8e136d12 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@ -205,7 +205,7 @@ static void do_relax_face_sets_brush_task_cb_ex(void *__restrict userdata,
ss, &test, data->brush->falloff_shape);
const bool relax_face_sets = !(ss->cache->iteration_count % 3 == 0);
- /* This operations needs a stregth tweak as the relax deformation is too weak by default. */
+ /* This operations needs a strength tweak as the relax deformation is too weak by default. */
if (relax_face_sets) {
bstrength *= 2.0f;
}
@@ -313,7 +313,7 @@ static int sculpt_face_set_create_exec(bContext *C, wmOperator *op)
const int mode = RNA_enum_get(op->ptr, "mode");
- /* Dyntopo not suported. */
+ /* Dyntopo not supported. */
if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) {
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
index e11894a8c01..3cf6a8cc561 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
@@ -553,7 +553,7 @@ static void mesh_filter_sharpen_init(SculptSession *ss,
filter_cache->sharpen_factor[i] = 1.0f - pow2f(1.0f - filter_cache->sharpen_factor[i]);
}
- /* Smooth the calculated factors and directions to remove high frecuency detail. */
+ /* Smooth the calculated factors and directions to remove high frequency detail. */
for (int smooth_iterations = 0;
smooth_iterations < filter_cache->sharpen_curvature_smooth_iterations;
smooth_iterations++) {
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index d1e17c7e59b..f90cf366ed9 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -511,7 +511,7 @@ void SCULPT_boundary_edges_preview_draw(const uint gpuattr,
const float outline_alpha);
void SCULPT_boundary_pivot_line_preview_draw(const uint gpuattr, struct SculptSession *ss);
-/* Multiplane Scrape Brush. */
+/* Multi-plane Scrape Brush. */
void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode);
void SCULPT_multiplane_scrape_preview_draw(const uint gpuattr,
Brush *brush,
diff --git a/source/blender/editors/sculpt_paint/sculpt_pose.c b/source/blender/editors/sculpt_paint/sculpt_pose.c
index 1bf9ba60073..f9ccbbb849c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_pose.c
+++ b/source/blender/editors/sculpt_paint/sculpt_pose.c
@@ -738,7 +738,7 @@ static SculptPoseIKChain *pose_ik_chain_init_topology(Sculpt *sd,
* iteration an the current iteration. */
for (int j = 0; j < totvert; j++) {
ik_chain->segments[i].weights[j] = pose_factor_grow[j] - pose_factor_grow_prev[j];
- /* Store the current grow factor status for the next interation. */
+ /* Store the current grow factor status for the next iteration. */
pose_factor_grow_prev[j] = pose_factor_grow[j];
}
}