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-08-31 06:36:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-31 07:33:57 +0300
commitd718d6b4493429a1e688e874fd76963f98e3d034 (patch)
treeefc5d34c087b6306571f469eeaf727d9e98d5234 /source/blender/blenkernel
parent29590eec6e21a4e1a2d45221e6dbb5733c354969 (diff)
Cleanup: Use C style comments for descriptive text
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/armature_test.cc6
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c16
-rw-r--r--source/blender/blenkernel/intern/effect.c4
-rw-r--r--source/blender/blenkernel/intern/fluid.c10
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c2
-rw-r--r--source/blender/blenkernel/intern/freestyle.c2
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c2
-rw-r--r--source/blender/blenkernel/intern/text.c6
8 files changed, 25 insertions, 23 deletions
diff --git a/source/blender/blenkernel/intern/armature_test.cc b/source/blender/blenkernel/intern/armature_test.cc
index 99eb064d061..2994563175f 100644
--- a/source/blender/blenkernel/intern/armature_test.cc
+++ b/source/blender/blenkernel/intern/armature_test.cc
@@ -176,9 +176,9 @@ class BKE_armature_find_selected_bones_test : public testing::Test {
bone2.childbase = {nullptr, nullptr};
bone3.childbase = {nullptr, nullptr};
- BLI_addtail(&arm.bonebase, &bone1); // bone1 is root bone
- BLI_addtail(&arm.bonebase, &bone2); // bone2 is root bone
- BLI_addtail(&bone2.childbase, &bone3); // bone3 has bone2 as parent
+ BLI_addtail(&arm.bonebase, &bone1); /* bone1 is root bone. */
+ BLI_addtail(&arm.bonebase, &bone2); /* bone2 is root bone. */
+ BLI_addtail(&bone2.childbase, &bone3); /* bone3 has bone2 as parent. */
/* Make sure the armature & its bones are visible, to make them selectable. */
arm.layer = bone1.layer = bone2.layer = bone3.layer = 1;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 8f94c407cae..0dc4f64cec1 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3978,7 +3978,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
total_sample = gaussianTotal;
}
- /* Supersampling */
+ /* Super-sampling */
for (ss = 0; ss < samples; ss++) {
float ray_start[3], ray_dir[3];
float sample_factor = 0.0f;
@@ -3999,7 +3999,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
float hitCoord[3];
int hitTri = -1;
- /* Supersampling factor */
+ /* Super-sampling factor. */
if (samples > 1 && surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) {
sample_factor = gaussianFactors[ss];
}
@@ -4240,25 +4240,25 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
numOfHits++;
}
- /* apply sample strength */
+ /* Apply sample strength. */
brushStrength += sampleStrength;
- } // end supersampling
+ } /* End super-sampling. */
- /* if any sample was inside paint range */
+ /* If any sample was inside paint range. */
if (brushStrength > 0.0f || depth > 0.0f) {
- /* apply supersampling results */
+ /* Apply super-sampling results. */
if (samples > 1) {
brushStrength /= total_sample;
}
CLAMP(brushStrength, 0.0f, 1.0f);
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
- /* Get final pixel color and alpha */
+ /* Get final pixel color and alpha. */
paintColor[0] /= numOfHits;
paintColor[1] /= numOfHits;
paintColor[2] /= numOfHits;
}
- /* get final object space depth */
+ /* Get final object space depth. */
else if (ELEM(surface->type, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE)) {
depth /= bData->bNormal[index].normal_scale * total_sample;
}
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 334118ddf3f..a88339082fe 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -481,7 +481,9 @@ static void eff_tri_ray_hit(void *UNUSED(userData),
hit->index = 1;
}
-// get visibility of a wind ray
+/**
+ * Get visibility of a wind ray.
+ */
static float eff_calc_visibility(ListBase *colliders,
EffectorCache *eff,
EffectorData *efd,
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 87c1f99fd73..5a5e1208ff0 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -1580,7 +1580,7 @@ static void emit_from_particles(Object *flow_ob,
/* initialize particle cache */
if (psys->part->type == PART_HAIR) {
- // TODO: PART_HAIR not supported whatsoever
+ /* TODO: PART_HAIR not supported whatsoever. */
totchild = 0;
}
else {
@@ -1674,9 +1674,9 @@ static void emit_from_particles(Object *flow_ob,
if (ffs->flags & FLUID_FLOW_INITVELOCITY && (psys->part->phystype != PART_PHYS_NO)) {
madd_v3_v3fl(&bb->velocity[index * 3], &particle_vel[p * 3], ffs->vel_multi);
}
- } // particles loop
+ } /* particles loop */
}
- else if (valid_particles > 0) { // FLUID_FLOW_USE_PART_SIZE
+ else if (valid_particles > 0) { /* #FLUID_FLOW_USE_PART_SIZE */
int min[3], max[3], res[3];
/* setup loop bounds */
@@ -3171,7 +3171,7 @@ static void update_effectors_task_cb(void *__restrict userdata,
if ((data->fuel && MAX2(data->density[index], data->fuel[index]) < FLT_EPSILON) ||
(data->density && data->density[index] < FLT_EPSILON) ||
(data->phi_obs_in && data->phi_obs_in[index] < 0.0f) ||
- data->flags[index] & 2) // mantaflow convention: 2 == FlagObstacle
+ data->flags[index] & 2) /* Manta-flow convention: `2 == FlagObstacle`. */
{
continue;
}
@@ -4253,7 +4253,7 @@ static float calc_voxel_transp(
{
const size_t index = manta_get_index(pixel[0], res[0], pixel[1], res[1], pixel[2]);
- // T_ray *= T_vox
+ /* `T_ray *= T_vox`. */
*t_ray *= expf(input[index] * correct);
if (result[index] < 0.0f) {
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 641c003d456..5aa3815729f 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -580,7 +580,7 @@ int BKE_fcm_envelope_find_index(FCM_EnvelopeData array[],
if (loopbreaker == (maxloop - 1)) {
CLOG_ERROR(&LOG, "binary search was taking too long");
- // include debug info
+ /* Include debug info. */
CLOG_ERROR(&LOG,
"\tround = %d: start = %d, end = %d, arraylen = %d",
loopbreaker,
diff --git a/source/blender/blenkernel/intern/freestyle.c b/source/blender/blenkernel/intern/freestyle.c
index aa3b4f1ef5e..d9b3faf8623 100644
--- a/source/blender/blenkernel/intern/freestyle.c
+++ b/source/blender/blenkernel/intern/freestyle.c
@@ -34,7 +34,7 @@
#include "BKE_lib_id.h"
#include "BKE_linestyle.h"
-// function declarations
+/* Function declarations. */
static FreestyleLineSet *alloc_lineset(void);
static void copy_lineset(FreestyleLineSet *new_lineset, FreestyleLineSet *lineset, const int flag);
static FreestyleModuleConfig *alloc_module(void);
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 93cffcf7164..c30f94a4cf6 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -914,7 +914,7 @@ static void long_edge_queue_edge_add_recursive(
for (int i = 0; i < ARRAY_SIZE(l_adjacent); i++) {
float len_sq_other = BM_edge_calc_length_squared(l_adjacent[i]->e);
if (len_sq_other > max_ff(len_sq_cmp, limit_len_sq)) {
- // edge_queue_insert(eq_ctx, l_adjacent[i]->e, -len_sq_other);
+ // edge_queue_insert(eq_ctx, l_adjacent[i]->e, -len_sq_other);
long_edge_queue_edge_add_recursive(
eq_ctx, l_adjacent[i]->radial_next, l_adjacent[i], len_sq_other, limit_len);
}
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 6b7b3213a83..f67bf68010d 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -342,9 +342,9 @@ int txt_extended_ascii_as_utf8(char **str)
return added;
}
-// this function removes any control characters from
-// a textline and fixes invalid utf-8 sequences
-
+/**
+ * Removes any control characters from a text-line and fixes invalid UTF8 sequences.
+ */
static void cleanup_textline(TextLine *tl)
{
int i;