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>2020-07-02 05:58:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-07-02 06:03:46 +0300
commit26ffed74661e4e67d7d7f720404d3f821d824d55 (patch)
tree3227a81eab8158780ccd6c98d664060e422d434c
parentafd976a3b483ae0e0bc9547825ff587e5297a23c (diff)
Cleanup: spelling
-rw-r--r--intern/cycles/render/colorspace.cpp4
-rw-r--r--intern/cycles/render/graph.cpp8
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c12
-rw-r--r--source/blender/blenlib/intern/bitmap.c2
-rw-r--r--source/blender/blenlib/intern/string.c34
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c44
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c63
-rw-r--r--source/creator/creator.c2
8 files changed, 95 insertions, 74 deletions
diff --git a/intern/cycles/render/colorspace.cpp b/intern/cycles/render/colorspace.cpp
index 7605fcaf5ff..57979d5f225 100644
--- a/intern/cycles/render/colorspace.cpp
+++ b/intern/cycles/render/colorspace.cpp
@@ -266,7 +266,7 @@ inline void processor_apply_pixels(const OCIO::Processor *processor, T *pixels,
{
/* TODO: implement faster version for when we know the conversion
* is a simple matrix transform between linear spaces. In that case
- * unpremultiply is not needed. */
+ * un-premultiply is not needed. */
/* Process large images in chunks to keep temporary memory requirement down. */
const size_t chunk_size = std::min((size_t)(16 * 1024 * 1024), num_pixels);
@@ -354,7 +354,7 @@ void ColorSpaceManager::to_scene_linear(ColorSpaceProcessor *processor_,
processor->applyRGB(pixel);
}
else {
- /* Unassociate and associate alpha since color management should not
+ /* Un-associate and associate alpha since color management should not
* be affected by transparency. */
float alpha = pixel[3];
float inv_alpha = 1.0f / alpha;
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp
index d2db59894ea..436324b00ba 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -942,12 +942,12 @@ void ShaderGraph::refine_bump_nodes()
foreach (NodePair &pair, nodes_dy)
add(pair.second);
- /* connect what is connected is bump to samplecenter input*/
+ /* Connect what is connected is bump to sample-center input. */
connect(out, node->input("SampleCenter"));
- /* bump input is just for connectivity purpose for the graph input,
- * we re-connected this input to samplecenter, so lets disconnect it
- * from bump input */
+ /* Bump input is just for connectivity purpose for the graph input,
+ * we re-connected this input to sample-center, so lets disconnect it
+ * from bump input. */
disconnect(bump_input);
}
}
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 9d1981b3392..40b011dca9e 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1032,12 +1032,14 @@ bool BLI_bvhtree_update_node(
return true;
}
-/* call BLI_bvhtree_update_node() first for every node/point/triangle */
+/**
+ * Call #BLI_bvhtree_update_node() first for every node/point/triangle.
+ */
void BLI_bvhtree_update_tree(BVHTree *tree)
{
/* Update bottom=>top
- * TRICKY: the way we build the tree all the childs have an index greater than the parent
- * This allows us todo a bottom up update by starting on the bigger numbered branch */
+ * TRICKY: the way we build the tree all the children have an index greater than the parent
+ * This allows us todo a bottom up update by starting on the bigger numbered branch. */
BVHNode **root = tree->nodes + tree->totleaf;
BVHNode **index = tree->nodes + tree->totleaf + tree->totbranch - 1;
@@ -2309,7 +2311,7 @@ static bool bvhtree_walk_dfs_recursive(BVHTree_WalkData *walk_data, const BVHNod
}
/**
- * This is a generic function to perform a depth first search on the BVHTree
+ * This is a generic function to perform a depth first search on the #BVHTree
* where the search order and nodes traversed depend on callbacks passed in.
*
* \param tree: Tree to walk.
@@ -2317,7 +2319,7 @@ static bool bvhtree_walk_dfs_recursive(BVHTree_WalkData *walk_data, const BVHNod
* \param walk_leaf_cb: Callback to test leaf nodes, callback must store its own result,
* returning false exits early.
* \param walk_order_cb: Callback that indicates which direction to search,
- * either from the node with the lower or higher k-dop axis value.
+ * either from the node with the lower or higher K-DOP axis value.
* \param userdata: Argument passed to all callbacks.
*/
void BLI_bvhtree_walk_dfs(BVHTree *tree,
diff --git a/source/blender/blenlib/intern/bitmap.c b/source/blender/blenlib/intern/bitmap.c
index d24047397fb..54edcaec2c8 100644
--- a/source/blender/blenlib/intern/bitmap.c
+++ b/source/blender/blenlib/intern/bitmap.c
@@ -20,7 +20,7 @@
/** \file
* \ingroup bli
*
- * Utility functions for variable size bitmasks.
+ * Utility functions for variable size bit-masks.
*/
#include <limits.h>
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index ef137c4459e..abdae06acd5 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -409,7 +409,7 @@ char *BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict
/**
* string with all instances of substr_old replaced with substr_new,
- * Returns a copy of the cstring \a str into a newly mallocN'd
+ * Returns a copy of the c-string \a str into a newly #MEM_mallocN'd
* and returns it.
*
* \note A rather wasteful string-replacement utility, though this shall do for now...
@@ -430,53 +430,49 @@ char *BLI_str_replaceN(const char *__restrict str,
BLI_assert(substr_old[0] != '\0');
- /* while we can still find a match for the old substring that we're searching for,
- * keep dicing and replacing
- */
+ /* While we can still find a match for the old sub-string that we're searching for,
+ * keep dicing and replacing. */
while ((match = strstr(str, substr_old))) {
/* the assembly buffer only gets created when we actually need to rebuild the string */
if (ds == NULL) {
ds = BLI_dynstr_new();
}
- /* if the match position does not match the current position in the string,
- * copy the text up to this position and advance the current position in the string
- */
+ /* If the match position does not match the current position in the string,
+ * copy the text up to this position and advance the current position in the string. */
if (str != match) {
- /* add the segment of the string from str to match to the buffer,
- * then restore the value at match */
+ /* Add the segment of the string from `str` to match to the buffer,
+ * then restore the value at match. */
BLI_dynstr_nappend(ds, str, (match - str));
/* now our current position should be set on the start of the match */
str = match;
}
- /* add the replacement text to the accumulation buffer */
+ /* Add the replacement text to the accumulation buffer. */
BLI_dynstr_append(ds, substr_new);
- /* advance the current position of the string up to the end of the replaced segment */
+ /* Advance the current position of the string up to the end of the replaced segment. */
str += len_old;
}
- /* finish off and return a new string that has had all occurrences of */
+ /* Finish off and return a new string that has had all occurrences of. */
if (ds) {
char *str_new;
- /* add what's left of the string to the assembly buffer
- * - we've been adjusting str to point at the end of the replaced segments
- */
+ /* Add what's left of the string to the assembly buffer
+ * - we've been adjusting `str` to point at the end of the replaced segments. */
BLI_dynstr_append(ds, str);
- /* convert to new c-string (MEM_malloc'd), and free the buffer */
+ /* Convert to new c-string (MEM_malloc'd), and free the buffer. */
str_new = BLI_dynstr_get_cstring(ds);
BLI_dynstr_free(ds);
return str_new;
}
else {
- /* just create a new copy of the entire string - we avoid going through the assembly buffer
- * for what should be a bit more efficiency...
- */
+ /* Just create a new copy of the entire string - we avoid going through the assembly buffer
+ * for what should be a bit more efficiency. */
return BLI_strdup(str);
}
}
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index f4c08f3153b..1d48634203f 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -901,16 +901,17 @@ static void math_layer_info_init(BevelParams *bp, BMesh *bm)
MEM_freeN(stack);
}
-/* Use a tie-breaking rule to choose a representative face when
- * there are number of choices, face[0], face[1], ..., face[nfaces].
+/**
+ * Use a tie-breaking rule to choose a representative face when
+ * there are number of choices, `face[0]`, `face[1]`, ..., `face[nfaces]`.
* This is needed when there are an odd number of segments, and the center
- * segmment (and its continuation into vmesh) can usually arbitrarily be
+ * segment (and its continuation into vmesh) can usually arbitrarily be
* the previous face or the next face.
* Or, for the center polygon of a corner, all of the faces around
* the vertex are possible choices.
* If we just choose randomly, the resulting UV maps or material
* assignment can look ugly/inconsistent.
- * Allow for the case when args are null.
+ * Allow for the case when arguments are null.
*/
static BMFace *choose_rep_face(BevelParams *bp, BMFace **face, int nfaces)
{
@@ -2948,7 +2949,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct)
bool betodd = (between % 2) == 1;
int i = 0;
/* Put first half of in-between edges at index 0, second half at index bp->seg.
- * If between is odd, put middle one at midindex. */
+ * If between is odd, put middle one at mid-index. */
for (e3 = e->next; e3 != e2; e3 = e3->next) {
v1->elast = e3;
if (i < bet2) {
@@ -4682,10 +4683,11 @@ static float interp_poly_area(BevVert *bv, BMFace *frep)
}
/**
- * If we make a poly out of verts around bv, snapping to rep frep, will uv poly have zero area?
- * The uv poly is made by snapping all outside-of-frep vertices to the closest edge in frep.
+ * If we make a poly out of verts around \a bv, snapping to rep \a frep,
+ * will uv poly have zero area?
+ * The uv poly is made by snapping all `outside-of-frep` vertices to the closest edge in \a frep.
* Sometimes this results in a zero or very small area polygon, which translates to a zero
- * or very small area polygong in UV space -- not good for interpolating textures.
+ * or very small area polygon in UV space -- not good for interpolating textures.
*/
static bool is_bad_uv_poly(BevVert *bv, BMFace *frep)
{
@@ -4693,8 +4695,8 @@ static bool is_bad_uv_poly(BevVert *bv, BMFace *frep)
return area < BEVEL_EPSILON_BIG;
}
-/*
- * Pick a good face from all the faces around bv to use for
+/**
+ * Pick a good face from all the faces around \a bv to use for
* a representative face, using choose_rep_face.
* We want to choose from among the faces that would be
* chosen for a single-segment edge polygon between two successive
@@ -4801,10 +4803,12 @@ static void build_center_ngon(BevelParams *bp, BMesh *bm, BevVert *bv, int mat_n
BLI_array_free(ve);
}
-/* Special case of bevel_build_rings when tri-corner and profile is 0.
+/**
+ * Special case of #bevel_build_rings when triangle-corner and profile is 0.
* There is no corner mesh except, if nseg odd, for a center poly.
* Boundary verts merge with previous ones according to pattern:
- * (i, 0, k) merged with (i+1, 0, ns-k) for k <= ns/2. */
+ * (i, 0, k) merged with (i+1, 0, ns-k) for k <= ns/2.
+ */
static void build_square_in_vmesh(BevelParams *bp, BMesh *bm, BevVert *bv, VMesh *vm1)
{
int n, ns, ns2, odd, i, k;
@@ -4838,7 +4842,9 @@ static void build_square_in_vmesh(BevelParams *bp, BMesh *bm, BevVert *bv, VMesh
}
}
-/* Copy whichever of a and b is closer to v into r. */
+/**
+ * Copy whichever of \a a and \a b is closer to v into \a r.
+ */
static void closer_v3_v3v3v3(float r[3], float a[3], float b[3], float v[3])
{
if (len_squared_v3v3(a, v) <= len_squared_v3v3(b, v)) {
@@ -4998,7 +5004,7 @@ static VMesh *square_out_adj_vmesh(BevelParams *bp, BevVert *bv)
bndv = bndv->next;
}
- /* Fill in rest of centerlines by interpolation. */
+ /* Fill in rest of center-lines by interpolation. */
copy_v3_v3(co2, bv->v->co);
bndv = vm->boundstart;
for (i = 0; i < n_bndv; i++) {
@@ -5049,7 +5055,7 @@ static VMesh *square_out_adj_vmesh(BevelParams *bp, BevVert *bv)
}
vmesh_copy_equiv_verts(vm);
- /* Fill in interior points by interpolation from edges to centerlines. */
+ /* Fill in interior points by interpolation from edges to center-lines. */
bndv = vm->boundstart;
for (i = 0; i < n_bndv; i++) {
im1 = (i == 0) ? n_bndv - 1 : i - 1;
@@ -5087,9 +5093,9 @@ static VMesh *square_out_adj_vmesh(BevelParams *bp, BevVert *bv)
}
/**
- * Given that the boundary is built and the boundary BMVerts have been made,
+ * Given that the boundary is built and the boundary #BMVert's have been made,
* calculate the positions of the interior mesh points for the M_ADJ pattern,
- * using cubic subdivision, then make the BMVerts and the new faces.
+ * using cubic subdivision, then make the #BMVert's and the new faces.
*/
static void bevel_build_rings(BevelParams *bp, BMesh *bm, BevVert *bv, BoundVert *vpipe)
{
@@ -5312,7 +5318,7 @@ static void bevel_build_cutoff(BevelParams *bp, BMesh *bm, BevVert *bv)
i = bndv->index;
/* Find the "down" direction for this side of the cutoff face. */
- /* Find the direction along the intersection of the two adjecent profile normals. */
+ /* Find the direction along the intersection of the two adjacent profile normals. */
cross_v3_v3v3(down_direction, bndv->profile.plane_no, bndv->prev->profile.plane_no);
if (dot_v3v3(down_direction, bv->v->no) > 0.0f) {
negate_v3(down_direction);
@@ -7121,7 +7127,7 @@ static float find_profile_fullness(BevelParams *bp)
/**
* Fills the ProfileSpacing struct with the 2D coordinates for the profile's vertices.
- * The superellipse used for multisegment profiles does not have a closed-form way
+ * The superellipse used for multi-segment profiles does not have a closed-form way
* to generate evenly spaced points along an arc. We use an expensive search procedure
* to find the parameter values that lead to bp->seg even chords.
* We also want spacing for a number of segments that is a power of 2 >= bp->seg (but at least 4).
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 4d43d3e44e5..929f466f808 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -106,7 +106,7 @@
* This is read-only, for writing use PBVH vertex iterators. There vd.index matches
* the indices used here.
*
- * For multires, the same vertex in multiple grids is counted multiple times, with
+ * For multi-resolution, the same vertex in multiple grids is counted multiple times, with
* different index for each grid. */
void SCULPT_vertex_random_access_init(SculptSession *ss)
@@ -779,25 +779,32 @@ bool SCULPT_vertex_is_boundary(SculptSession *ss, const int index)
/* Utils */
-/* Returns true when the step belongs to the stroke that is directly performend by the brush and
- * not by one of the symmetry passes. */
+/**
+ * Returns true when the step belongs to the stroke that is directly performed by the brush and
+ * not by one of the symmetry passes.
+ */
bool SCULPT_stroke_is_main_symmetry_pass(StrokeCache *cache)
{
return cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 &&
cache->tile_pass == 0;
}
-/* Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes
- * enabled. */
-/* This should be used for functionality that needs to be computed once per stroke of a particular
- * tool (allocating memory, updating random seeds...). */
+/**
+ * Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes
+ * enabled.
+ *
+ * This should be used for functionality that needs to be computed once per stroke of a particular
+ * tool (allocating memory, updating random seeds...).
+ */
bool SCULPT_stroke_is_first_brush_step(StrokeCache *cache)
{
return cache->first_time && cache->mirror_symmetry_pass == 0 &&
cache->radial_symmetry_pass == 0 && cache->tile_pass == 0;
}
-/* Returnns true on the first brush step of each symmetry pass. */
+/**
+ * Returns true on the first brush step of each symmetry pass.
+ */
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(StrokeCache *cache)
{
return cache->first_time;
@@ -1119,8 +1126,10 @@ typedef enum StrokeFlags {
CLIP_Z = 4,
} StrokeFlags;
-/* Initialize a SculptOrigVertData for accessing original vertex data;
- * handles BMesh, mesh, and multires. */
+/**
+ * Initialize a #SculptOrigVertData for accessing original vertex data;
+ * handles #BMesh, #Mesh, and multi-resolution.
+ */
void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, SculptUndoNode *unode)
{
SculptSession *ss = ob->sculpt;
@@ -1140,8 +1149,10 @@ void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, Scul
}
}
-/* Initialize a SculptOrigVertData for accessing original vertex data;
- * handles BMesh, mesh, and multires. */
+/**
+ * Initialize a #SculptOrigVertData for accessing original vertex data;
+ * handles #BMesh, #Mesh, and multi-resolution.
+ */
void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *node)
{
SculptUndoNode *unode;
@@ -1149,8 +1160,9 @@ void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *
SCULPT_orig_vert_data_unode_init(data, ob, unode);
}
-/* Update a SculptOrigVertData for a particular vertex from the PBVH
- * iterator. */
+/**
+ * Update a #SculptOrigVertData for a particular vertex from the PBVH iterator.
+ */
void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter)
{
if (orig_data->unode->type == SCULPT_UNDO_COORDS) {
@@ -1286,8 +1298,8 @@ static void sculpt_project_v3(const SculptProjectVector *spvc, const float vec[3
* otherwise.
*
* Factors: some brushes like grab cannot do dynamic topology.
- * Others, like smooth, are better without. Same goes for alt-
- * key smoothing. */
+ * Others, like smooth, are better without.
+ * Same goes for alt-key smoothing. */
bool SCULPT_stroke_is_dynamic_topology(const SculptSession *ss, const Brush *brush)
{
return ((BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) &&
@@ -2143,9 +2155,11 @@ static void calc_area_normal_and_center(
/** \} */
-/* Return modified brush strength. Includes the direction of the brush, positive
+/**
+ * Return modified brush strength. Includes the direction of the brush, positive
* values pull vertices, negative values push. Uses tablet pressure and a
- * special multiplier found experimentally to scale the strength factor. */
+ * special multiplier found experimentally to scale the strength factor.
+ */
static float brush_strength(const Sculpt *sd,
const StrokeCache *cache,
const float feather,
@@ -2461,7 +2475,9 @@ bool SCULPT_search_circle_cb(PBVHNode *node, void *data_v)
return dist_sq < data->radius_squared || true;
}
-/* Handles clipping against a mirror modifier and SCULPT_LOCK axis flags. */
+/**
+ * Handles clipping against a mirror modifier and #SCULPT_LOCK_X/Y/Z axis flags.
+ */
void SCULPT_clip(Sculpt *sd, SculptSession *ss, float co[3], const float val[3])
{
for (int i = 0; i < 3; i++) {
@@ -5967,9 +5983,10 @@ static void do_radial_symmetry(Sculpt *sd,
}
}
-/* Noise texture gives different values for the same input coord; this
- * can tear a multires mesh during sculpting so do a stitch in this
- * case. */
+/**
+ * Noise texture gives different values for the same input coord; this
+ * can tear a multi-resolution mesh during sculpting so do a stitch in this case.
+ */
static void sculpt_fix_noise_tear(Sculpt *sd, Object *ob)
{
SculptSession *ss = ob->sculpt;
@@ -5996,7 +6013,7 @@ static void do_symmetrical_brush_actions(Sculpt *sd,
cache->bstrength = brush_strength(sd, cache, feather, ups);
cache->symmetry = symm;
- /* symm is a bit combination of XYZ -
+ /* `symm` is a bit combination of XYZ -
* 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
for (int i = 0; i <= symm; i++) {
if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
diff --git a/source/creator/creator.c b/source/creator/creator.c
index abf55b8d52b..abc443425a8 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -125,7 +125,7 @@ void main_python_exit(void);
* patched USD (see usd.diff) to avoid that particular static constructor, and have an
* initialization function instead.
*
- * This function is implemented in the USD source code, pxr/base/lib/plug/initConfig.cpp.
+ * This function is implemented in the USD source code, `pxr/base/lib/plug/initConfig.cpp`.
*/
void usd_initialise_plugin_path(const char *datafiles_usd_path);
#endif