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-26 14:35:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-26 14:50:48 +0300
commitf1e49038543cf75766f4a220f62cdc6cdbc0e27d (patch)
tree0cec2c64739a6a4ca246fe26bed6fe629ea315cb /source/blender/modifiers
parentfae5a907d4d1380f087f1226ebbd65d9d0718cc6 (diff)
Cleanup: full sentences in comments, improve comment formatting
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_edgesplit.c2
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c2
-rw-r--r--source/blender/modifiers/intern/MOD_laplaciansmooth.c26
-rw-r--r--source/blender/modifiers/intern/MOD_meshcache.c6
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c4
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c48
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c2
-rw-r--r--source/blender/modifiers/intern/MOD_wave.c4
8 files changed, 47 insertions, 47 deletions
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c
index 2874bebe13a..82a6e169a7a 100644
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@ -89,7 +89,7 @@ Mesh *doEdgeSplit(const Mesh *mesh, EdgeSplitModifierData *emd)
UNLIKELY(l1 != l2->radial_next) ||
/* O° angle setting, we want to split on all edges. */
do_split_all ||
- /* 2 face edge - check angle*/
+ /* 2 face edge - check angle. */
(dot_v3v3(l1->f->no, l2->f->no) < threshold)) {
BM_elem_flag_enable(e, BM_ELEM_TAG);
}
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index 28fe4376d2c..4e53243d820 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -1048,7 +1048,7 @@ static Mesh *explodeMesh(ExplodeModifierData *emd,
}
BLI_edgehashIterator_free(ehi);
- /*map new vertices to faces*/
+ /* Map new vertices to faces. */
for (i = 0, u = 0; i < totface; i++) {
MFace source;
int orig_v4;
diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
index 78e0bf3fa8f..63495c4104e 100644
--- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c
+++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
@@ -57,18 +57,18 @@
struct BLaplacianSystem {
float *eweights; /* Length weights per Edge */
float (*fweights)[3]; /* Cotangent weights per face */
- float *ring_areas; /* Total area per ring*/
- float *vlengths; /* Total sum of lengths(edges) per vertice*/
- float *vweights; /* Total sum of weights per vertice*/
- int numEdges; /* Number of edges*/
- int numLoops; /* Number of edges*/
- int numPolys; /* Number of faces*/
- int numVerts; /* Number of verts*/
- short *numNeFa; /* Number of neighbors faces around vertice*/
- short *numNeEd; /* Number of neighbors Edges around vertice*/
- short *zerola; /* Is zero area or length*/
-
- /* Pointers to data*/
+ float *ring_areas; /* Total area per ring. */
+ float *vlengths; /* Total sum of lengths(edges) per vertex. */
+ float *vweights; /* Total sum of weights per vertex. */
+ int numEdges; /* Number of edges. */
+ int numLoops; /* Number of edges. */
+ int numPolys; /* Number of faces. */
+ int numVerts; /* Number of verts. */
+ short *numNeFa; /* Number of neighbors faces around vertice. */
+ short *numNeEd; /* Number of neighbors Edges around vertice. */
+ short *zerola; /* Is zero area or length. */
+
+ /* Pointers to data. */
float (*vertexCos)[3];
const MPoly *mpoly;
const MLoop *mloop;
@@ -299,7 +299,7 @@ static void fill_laplacian_matrix(LaplacianSystem *sys)
for (; l_next != l_term; l_prev = l_curr, l_curr = l_next, l_next++) {
const uint l_curr_index = l_curr - sys->mloop;
- /* Is ring if number of faces == number of edges around vertice*/
+ /* Is ring if number of faces == number of edges around vertice. */
if (sys->numNeEd[l_curr->v] == sys->numNeFa[l_curr->v] && sys->zerola[l_curr->v] == 0) {
EIG_linear_solver_matrix_add(sys->context,
l_curr->v,
diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c
index 361454120ca..6ec3277ee7a 100644
--- a/source/blender/modifiers/intern/MOD_meshcache.c
+++ b/source/blender/modifiers/intern/MOD_meshcache.c
@@ -198,11 +198,11 @@ static void meshcache_do(MeshCacheModifierData *mcmd,
me->mloop,
me->totvert,
- (const float(*)[3])vertexCos_Source, /* from the original Mesh*/
+ (const float(*)[3])vertexCos_Source, /* From the original Mesh. */
(const float(*)[3])vertexCos_Real, /* the input we've been given (shape keys!) */
- (const float(*)[3])vertexCos, /* the result of this modifier */
- vertexCos_New /* the result of this function */
+ (const float(*)[3])vertexCos, /* The result of this modifier. */
+ vertexCos_New /* The result of this function. */
);
/* write the corrected locations back into the result */
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index 60c5667472e..62ac9d4452d 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -383,7 +383,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
vert_part_value[vindex] = p_random;
}
- /*change orientation based on object trackflag*/
+ /* Change orientation based on object trackflag. */
copy_v3_v3(temp_co, mv->co);
mv->co[axis] = temp_co[track];
mv->co[(axis + 1) % 3] = temp_co[(track + 1) % 3];
@@ -490,7 +490,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
mul_m4_v3(spacemat, mv->co);
}
- /* create edges and adjust edge vertex indices*/
+ /* Create edges and adjust edge vertex indices. */
CustomData_copy_data(&mesh->edata, &result->edata, 0, p_skip * totedge, totedge);
MEdge *me = &result->medge[p_skip * totedge];
for (k = 0; k < totedge; k++, me++) {
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index b236e0896b7..9c577be1b77 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -518,7 +518,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
}
}
else {
- /*printf("\n\n\n\n\nStarting Modifier\n");*/
+ // printf("\n\n\n\n\nStarting Modifier\n");
/* set edge users */
med_new = medge_new;
mv_new = mvert_new;
@@ -539,7 +539,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] +
vc->co[other_axis_2] * vc->co[other_axis_2];
- /* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/
+ // printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);
}
}
else {
@@ -556,7 +556,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] +
vc->co[other_axis_2] * vc->co[other_axis_2];
- /* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/
+ // printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);
}
}
@@ -606,43 +606,43 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
/* compiler complains if not initialized, but it should be initialized below */
bool ed_loop_flip = false;
- /*printf("Loop on connected vert: %i\n", i);*/
+ // printf("Loop on connected vert: %i\n", i);
for (j = 0; j < 2; j++) {
- /*printf("\tSide: %i\n", j);*/
+ // printf("\tSide: %i\n", j);
screwvert_iter_init(&lt_iter, vert_connect, i, j);
if (j == 1) {
screwvert_iter_step(&lt_iter);
}
while (lt_iter.v_poin) {
- /*printf("\t\tVERT: %i\n", lt_iter.v);*/
+ // printf("\t\tVERT: %i\n", lt_iter.v);
if (lt_iter.v_poin->flag) {
- /*printf("\t\t\tBreaking Found end\n");*/
+ // printf("\t\t\tBreaking Found end\n");
// endpoints[0] = endpoints[1] = SV_UNUSED;
ed_loop_closed = 1; /* circle */
break;
}
lt_iter.v_poin->flag = 1;
vc_tot_linked++;
- /*printf("Testing 2 floats %f : %f\n", fl, lt_iter.v_poin->dist);*/
+ // printf("Testing 2 floats %f : %f\n", fl, lt_iter.v_poin->dist);
if (fl <= lt_iter.v_poin->dist) {
fl = lt_iter.v_poin->dist;
v_best = lt_iter.v;
- /*printf("\t\t\tVERT BEST: %i\n", v_best);*/
+ // printf("\t\t\tVERT BEST: %i\n", v_best);
}
screwvert_iter_step(&lt_iter);
if (!lt_iter.v_poin) {
- /*printf("\t\t\tFound End Also Num %i\n", j);*/
- /*endpoints[j] = lt_iter.v_other;*/ /* other is still valid */
+ // printf("\t\t\tFound End Also Num %i\n", j);
+ // endpoints[j] = lt_iter.v_other; /* other is still valid */
break;
}
}
}
- /* now we have a collection of used edges. flip their edges the right way*/
- /*if (v_best != SV_UNUSED) - */
+ /* Now we have a collection of used edges. flip their edges the right way. */
+ /* if (v_best != SV_UNUSED) - */
- /*printf("Done Looking - vc_tot_linked: %i\n", vc_tot_linked);*/
+ // printf("Done Looking - vc_tot_linked: %i\n", vc_tot_linked);
if (vc_tot_linked > 1) {
float vf_1, vf_2, vf_best;
@@ -654,8 +654,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
/* edge connects on each side! */
if (SV_IS_VALID(vc_tmp->v[0]) && SV_IS_VALID(vc_tmp->v[1])) {
- /*printf("Verts on each side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/
- /* find out which is higher */
+ // printf("Verts on each side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);
+ /* Find out which is higher. */
vf_1 = tmpf1[ltmd->axis];
vf_2 = tmpf2[ltmd->axis];
@@ -682,8 +682,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
}
}
}
- else if (SV_IS_VALID(vc_tmp->v[0])) { /*vertex only connected on 1 side */
- /*printf("Verts on ONE side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/
+ else if (SV_IS_VALID(vc_tmp->v[0])) { /* Vertex only connected on 1 side. */
+ // printf("Verts on ONE side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);
if (tmpf1[ltmd->axis] < vc_tmp->co[ltmd->axis]) { /* best is above */
ed_loop_flip = 1;
}
@@ -697,7 +697,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
}
#endif
- /*printf("flip direction %i\n", ed_loop_flip);*/
+ // printf("flip direction %i\n", ed_loop_flip);
/* Switch the flip option if set
* NOTE: flip is now done at face level so copying group slices is easier. */
@@ -713,10 +713,10 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
/* if its closed, we only need 1 loop */
for (j = ed_loop_closed; j < 2; j++) {
- /*printf("Ordering Side J %i\n", j);*/
+ // printf("Ordering Side J %i\n", j);
screwvert_iter_init(&lt_iter, vert_connect, v_best, j);
- /*printf("\n\nStarting - Loop\n");*/
+ // printf("\n\nStarting - Loop\n");
lt_iter.v_poin->flag = 1; /* so a non loop will traverse the other side */
/* If this is the vert off the best vert and
@@ -727,13 +727,13 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
}
while (lt_iter.v_poin && lt_iter.v_poin->flag != 2) {
- /*printf("\tOrdering Vert V %i\n", lt_iter.v);*/
+ // printf("\tOrdering Vert V %i\n", lt_iter.v);
lt_iter.v_poin->flag = 2;
if (lt_iter.e) {
if (lt_iter.v == lt_iter.e->v1) {
if (ed_loop_flip == 0) {
- /*printf("\t\t\tFlipping 0\n");*/
+ // printf("\t\t\tFlipping 0\n");
SWAP(uint, lt_iter.e->v1, lt_iter.e->v2);
}
#if 0
@@ -744,7 +744,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
}
else if (lt_iter.v == lt_iter.e->v2) {
if (ed_loop_flip == 1) {
- /*printf("\t\t\tFlipping 1\n");*/
+ // printf("\t\t\tFlipping 1\n");
SWAP(uint, lt_iter.e->v1, lt_iter.e->v2);
}
#if 0
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index 4dc45ad0324..ce427281db3 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -351,7 +351,7 @@ static bool get_show_adaptive_options(const bContext *C, Panel *panel)
return false;
}
- /* Don't show adaptive options if regular subdivision used*/
+ /* Don't show adaptive options if regular subdivision used. */
if (!RNA_boolean_get(ptr, "use_limit_surface")) {
return false;
}
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index c6bab89247e..cf4c195c66d 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -271,7 +271,7 @@ static void waveModifier_do(WaveModifierData *md,
amplit = amplit * wmd->narrow;
amplit = (float)(1.0f / expf(amplit * amplit) - minfac);
- /*apply texture*/
+ /* Apply texture. */
if (tex_co) {
Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
TexResult texres;
@@ -280,7 +280,7 @@ static void waveModifier_do(WaveModifierData *md,
amplit *= texres.tin;
}
- /*apply weight & falloff */
+ /* Apply weight & falloff. */
amplit *= def_weight * falloff_fac;
if (mvert) {