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/blenkernel/intern
parentfae5a907d4d1380f087f1226ebbd65d9d0718cc6 (diff)
Cleanup: full sentences in comments, improve comment formatting
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/action.c2
-rw-r--r--source/blender/blenkernel/intern/appdir.c2
-rw-r--r--source/blender/blenkernel/intern/armature.c2
-rw-r--r--source/blender/blenkernel/intern/blendfile.c2
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c2
-rw-r--r--source/blender/blenkernel/intern/collection.c2
-rw-r--r--source/blender/blenkernel/intern/colortools.c6
-rw-r--r--source/blender/blenkernel/intern/constraint.c10
-rw-r--r--source/blender/blenkernel/intern/curve_decimate.c4
-rw-r--r--source/blender/blenkernel/intern/customdata.c16
-rw-r--r--source/blender/blenkernel/intern/data_transfer.c4
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
-rw-r--r--source/blender/blenkernel/intern/editmesh.c2
-rw-r--r--source/blender/blenkernel/intern/effect.c2
-rw-r--r--source/blender/blenkernel/intern/fcurve.c4
-rw-r--r--source/blender/blenkernel/intern/fluid.c4
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c2
-rw-r--r--source/blender/blenkernel/intern/font.c2
-rw-r--r--source/blender/blenkernel/intern/gpencil.c28
-rw-r--r--source/blender/blenkernel/intern/gpencil_curve.c4
-rw-r--r--source/blender/blenkernel/intern/gpencil_geom.c6
-rw-r--r--source/blender/blenkernel/intern/idprop.c34
-rw-r--r--source/blender/blenkernel/intern/image.c4
-rw-r--r--source/blender/blenkernel/intern/image_save.c2
-rw-r--r--source/blender/blenkernel/intern/layer.c2
-rw-r--r--source/blender/blenkernel/intern/mball.c2
-rw-r--r--source/blender/blenkernel/intern/mesh.c17
-rw-r--r--source/blender/blenkernel/intern/mesh_boolean_convert.cc2
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c4
-rw-r--r--source/blender/blenkernel/intern/mesh_merge.c12
-rw-r--r--source/blender/blenkernel/intern/movieclip.c6
-rw-r--r--source/blender/blenkernel/intern/multires.c4
-rw-r--r--source/blender/blenkernel/intern/multires_reshape.c2
-rw-r--r--source/blender/blenkernel/intern/multires_unsubdivide.c2
-rw-r--r--source/blender/blenkernel/intern/nla.c4
-rw-r--r--source/blender/blenkernel/intern/node.cc6
-rw-r--r--source/blender/blenkernel/intern/object.c2
-rw-r--r--source/blender/blenkernel/intern/ocean.c16
-rw-r--r--source/blender/blenkernel/intern/ocean_intern.h2
-rw-r--r--source/blender/blenkernel/intern/particle.c2
-rw-r--r--source/blender/blenkernel/intern/particle_system.c18
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c2
-rw-r--r--source/blender/blenkernel/intern/pointcache.c24
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenkernel/intern/screen.c4
-rw-r--r--source/blender/blenkernel/intern/softbody.c172
-rw-r--r--source/blender/blenkernel/intern/subdiv_ccg.c2
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c32
-rw-r--r--source/blender/blenkernel/intern/workspace.c4
49 files changed, 248 insertions, 247 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 3c773cd1611..cf7023bc672 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1856,7 +1856,7 @@ void BKE_pose_blend_write(BlendWriter *writer, bPose *pose, bArmature *arm)
/* Write channels */
LISTBASE_FOREACH (bPoseChannel *, chan, &pose->chanbase) {
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- * of library blocks that implement this.*/
+ * of library blocks that implement this. */
if (chan->prop) {
IDP_BlendWrite(writer, chan->prop);
}
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index bcfd34ab42f..579f671e2b0 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -200,7 +200,7 @@ bool BKE_appdir_folder_documents(char *dir)
return true;
}
- /* Ghost couldn't give us a documents path, let's try if we can find it ourselves.*/
+ /* Ghost couldn't give us a documents path, let's try if we can find it ourselves. */
const char *home_path = BKE_appdir_folder_home();
if (!home_path || !BLI_is_dir(home_path)) {
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index f61acef1c15..5799f82bf94 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -198,7 +198,7 @@ static void write_bone(BlendWriter *writer, Bone *bone)
BLO_write_struct(writer, Bone, bone);
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- * of library blocks that implement this.*/
+ * of library blocks that implement this. */
if (bone->prop) {
IDP_BlendWrite(writer, bone->prop);
}
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index 9ea1c8fedda..f31d8f5ade7 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -272,7 +272,7 @@ static void setup_app_data(bContext *C,
/* We need to tag this here because events may be handled immediately after.
* only the current screen is important because we won't have to handle
- * events from multiple screens at once.*/
+ * events from multiple screens at once. */
if (curscreen) {
BKE_screen_gizmo_tag_refresh(curscreen);
}
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 116e6279657..4659c464099 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1143,7 +1143,7 @@ static BVHTree *bvhtree_from_editmesh_looptri_create_tree(float epsilon,
bool insert = looptri_mask ? BLI_BITMAP_TEST_BOOL(looptri_mask, i) : true;
if (insert) {
- /* No reason found to block hit-testing the triangle for snap, so insert it now.*/
+ /* No reason found to block hit-testing the triangle for snap, so insert it now. */
float co[3][3];
copy_v3_v3(co[0], ltri[0]->v->co);
copy_v3_v3(co[1], ltri[1]->v->co);
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 3f16526db09..fdffe7dca57 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -710,7 +710,7 @@ Collection *BKE_collection_duplicate(Main *bmain,
* unless its duplication is a sub-process of another one. */
collection_new->id.tag &= ~LIB_TAG_NEW;
- /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW.*/
+ /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW. */
BKE_libblock_relink_to_newid(&collection_new->id);
#ifndef NDEBUG
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index f30fcc54b23..df2277387ce 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -1280,12 +1280,12 @@ static void save_sample_line(
{
float yuv[3];
- /* vectorscope*/
+ /* Vector-scope. */
rgb_to_yuv(rgb[0], rgb[1], rgb[2], &yuv[0], &yuv[1], &yuv[2], BLI_YUV_ITU_BT709);
scopes->vecscope[idx + 0] = yuv[1];
scopes->vecscope[idx + 1] = yuv[2];
- /* waveform */
+ /* Waveform. */
switch (scopes->wavefrm_mode) {
case SCOPES_WAVEFRM_RGB:
case SCOPES_WAVEFRM_RGB_PARADE:
@@ -1497,7 +1497,7 @@ static void scopes_update_cb(void *__restrict userdata,
mul_v3_fl(ycc, INV_255);
minmax_v3v3_v3(min, max, ycc);
}
- /* increment count for histo*/
+ /* Increment count for histo. */
bin_lum[get_bin_float(luma)]++;
bin_r[get_bin_float(rgba[0])]++;
bin_g[get_bin_float(rgba[1])]++;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index bc5c1d9e41f..1d5cfa752a4 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -222,7 +222,7 @@ void BKE_constraints_clear_evalob(bConstraintOb *cob)
/* XXX This would seem to be in wrong order. However, it does not work in 'right' order -
* would be nice to understand why premul is needed here instead of usual postmul?
* In any case, we **do not get a delta** here (e.g. startmat & matrix having same location,
- * still gives a 'delta' with non-null translation component :/ ).*/
+ * still gives a 'delta' with non-null translation component :/ ). */
mul_m4_m4m4(delta, cob->matrix, imat);
/* copy matrices back to source */
@@ -1491,7 +1491,7 @@ static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
dir,
(data->followflag & FOLLOWPATH_FOLLOW) ? quat : NULL,
&radius,
- NULL)) { /* quat_pt is quat or NULL*/
+ NULL)) { /* quat_pt is quat or NULL. */
float totmat[4][4];
unit_m4(totmat);
@@ -2361,7 +2361,7 @@ static void pycon_new_data(void *cdata)
{
bPythonConstraint *data = (bPythonConstraint *)cdata;
- /* everything should be set correctly by calloc, except for the prop->type constant.*/
+ /* Everything should be set correctly by calloc, except for the prop->type constant. */
data->prop = MEM_callocN(sizeof(IDProperty), "PyConstraintProps");
data->prop->type = IDP_GROUP;
}
@@ -3523,7 +3523,7 @@ static void stretchto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
scale[0] = 1.0;
scale[2] = 1.0;
break;
- default: /* should not happen, but in case*/
+ default: /* Should not happen, but in case. */
return;
} /* switch (data->volmode) */
@@ -6297,7 +6297,7 @@ void BKE_constraint_blend_write(BlendWriter *writer, ListBase *conlist)
}
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- * of library blocks that implement this.*/
+ * of library blocks that implement this. */
IDP_BlendWrite(writer, data->prop);
break;
diff --git a/source/blender/blenkernel/intern/curve_decimate.c b/source/blender/blenkernel/intern/curve_decimate.c
index e4647908b58..62de7c74183 100644
--- a/source/blender/blenkernel/intern/curve_decimate.c
+++ b/source/blender/blenkernel/intern/curve_decimate.c
@@ -32,8 +32,8 @@
struct Knot {
struct Knot *next, *prev;
- uint point_index; /* index in point array */
- uint knot_index; /* index in knot array*/
+ uint point_index; /* Index in point array. */
+ uint knot_index; /* Index in knot array. */
float tan[2][3];
float handles[2];
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index ea05ab99d88..e4717f0b6da 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2099,7 +2099,7 @@ bool CustomData_merge(const struct CustomData *source,
eCDAllocType alloctype,
int totelem)
{
- /*const LayerTypeInfo *typeInfo;*/
+ // const LayerTypeInfo *typeInfo;
CustomDataLayer *layer, *newlayer;
int lasttype = -1, lastactive = 0, lastrender = 0, lastclone = 0, lastmask = 0;
int number = 0, maxnumber = -1;
@@ -2107,7 +2107,7 @@ bool CustomData_merge(const struct CustomData *source,
for (int i = 0; i < source->totlayer; i++) {
layer = &source->layers[i];
- /*typeInfo = layerType_getInfo(layer->type);*/ /*UNUSED*/
+ // typeInfo = layerType_getInfo(layer->type); /* UNUSED */
int type = layer->type;
int flag = layer->flag;
@@ -2631,7 +2631,7 @@ void *CustomData_add_layer(
return NULL;
}
-/*same as above but accepts a name*/
+/* Same as above but accepts a name. */
void *CustomData_add_layer_named(CustomData *data,
int type,
eCDAllocType alloctype,
@@ -3567,7 +3567,7 @@ bool CustomData_bmesh_merge(const CustomData *source,
if (iter_type != BM_LOOPS_OF_FACE) {
BMHeader *h;
BMIter iter;
- /*ensure all current elements follow new customdata layout*/
+ /* Ensure all current elements follow new customdata layout. */
BM_ITER_MESH (h, &iter, bm, iter_type) {
void *tmp = NULL;
CustomData_bmesh_copy_data(&destold, dest, h->data, &tmp);
@@ -3581,7 +3581,7 @@ bool CustomData_bmesh_merge(const CustomData *source,
BMIter iter;
BMIter liter;
- /*ensure all current elements follow new customdata layout*/
+ /* Ensure all current elements follow new customdata layout. */
BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
void *tmp = NULL;
@@ -3805,7 +3805,7 @@ void *CustomData_bmesh_get_n(const CustomData *data, void *block, int type, int
return POINTER_OFFSET(block, data->layers[layer_index + n].offset);
}
-/*gets from the layer at physical index n, note: doesn't check type.*/
+/* Gets from the layer at physical index n, note: doesn't check type. */
void *CustomData_bmesh_get_layer_n(const CustomData *data, void *block, int n)
{
if (n < 0 || n >= data->totlayer) {
@@ -3887,7 +3887,7 @@ bool CustomData_has_referenced(const struct CustomData *data)
}
/* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to
- * another, while not overwriting anything else (e.g. flags)*/
+ * another, while not overwriting anything else (e.g. flags). */
void CustomData_data_copy_value(int type, const void *source, void *dest)
{
const LayerTypeInfo *typeInfo = layerType_getInfo(type);
@@ -3905,7 +3905,7 @@ void CustomData_data_copy_value(int type, const void *source, void *dest)
}
/* Mixes the "value" (e.g. mloopuv uv or mloopcol colors) from one block into
- * another, while not overwriting anything else (e.g. flags)*/
+ * another, while not overwriting anything else (e.g. flags). */
void CustomData_data_mix_value(
int type, const void *source, void *dest, const int mixmode, const float mixfactor)
{
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 2bf58d9e764..12269cf0d51 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -1260,7 +1260,7 @@ void BKE_object_data_transfer_layout(struct Depsgraph *depsgraph,
me_dst = ob_dst->data;
- /* Get source evaluated mesh.*/
+ /* Get source evaluated mesh. */
BKE_object_data_transfer_dttypes_to_cdmask(data_types, &me_src_mask);
me_src = mesh_get_eval_final(depsgraph, scene, ob_src, &me_src_mask);
if (!me_src) {
@@ -1441,7 +1441,7 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
}
}
- /* Get source evaluated mesh.*/
+ /* Get source evaluated mesh. */
BKE_object_data_transfer_dttypes_to_cdmask(data_types, &me_src_mask);
BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(
map_vert_mode, map_edge_mode, map_loop_mode, map_poly_mode, &me_src_mask);
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 788a51257bf..2eb18a06799 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1757,7 +1757,7 @@ void dynamicPaint_clearSurface(const Scene *scene, DynamicPaintSurface *surface)
}
}
-/* completely (re)initializes surface (only for point cache types)*/
+/* Completely (re)initializes surface (only for point cache types). */
bool dynamicPaint_resetSurface(const Scene *scene, DynamicPaintSurface *surface)
{
int numOfPoints = dynamicPaint_surfaceNumOfPoints(surface);
@@ -4145,7 +4145,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
/* mix final sample strength depending on brush settings */
if (hit_found) {
- /* if "negate volume" enabled, negate all factors within volume*/
+ /* If "negate volume" enabled, negate all factors within volume. */
if (brush->collision == MOD_DPAINT_COL_VOLDIST && brush->flags & MOD_DPAINT_NEGATE_VOLUME) {
volume_factor = 1.0f - volume_factor;
if (inner_proximity) {
diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c
index b512309a773..49c2a2cbd89 100644
--- a/source/blender/blenkernel/intern/editmesh.c
+++ b/source/blender/blenkernel/intern/editmesh.c
@@ -222,7 +222,7 @@ void BKE_editmesh_free_derivedmesh(BMEditMesh *em)
MEM_SAFE_FREE(em->bb_cage);
}
-/*does not free the BMEditMesh struct itself*/
+/* Does not free the #BMEditMesh struct itself. */
void BKE_editmesh_free(BMEditMesh *em)
{
BKE_editmesh_free_derivedmesh(em);
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index e39749225ea..ff0fc4754e3 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -773,7 +773,7 @@ int get_effector_data(EffectorCache *eff,
/* use center of object for distance calculus */
const Object *ob = eff->ob;
- /* use z-axis as normal*/
+ /* Use z-axis as normal. */
normalize_v3_v3(efd->nor, ob->obmat[2]);
if (eff->pd && ELEM(eff->pd->shape, PFIELD_SHAPE_PLANE, PFIELD_SHAPE_LINE)) {
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 68ed3c239ef..18dac2fb679 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -1309,7 +1309,7 @@ void calchandles_fcurve_ex(FCurve *fcu, eBezTriple_Flag handle_sel_flag)
* - Need bezier keys.
* - Only bezier-interpolation has handles (for now).
*/
- if (ELEM(NULL, fcu, fcu->bezt) || (a < 2) /*|| ELEM(fcu->ipo, BEZT_IPO_CONST, BEZT_IPO_LIN)*/) {
+ if (ELEM(NULL, fcu, fcu->bezt) || (a < 2) /*|| ELEM(fcu->ipo, BEZT_IPO_CONST, BEZT_IPO_LIN) */) {
return;
}
@@ -2322,7 +2322,7 @@ void BKE_fmodifiers_blend_write(BlendWriter *writer, ListBase *fmodifiers)
FMod_Python *data = fcm->data;
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- * of library blocks that implement this.*/
+ * of library blocks that implement this. */
IDP_BlendWrite(writer, data->prop);
break;
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 553575b5c7b..947417af55d 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -4395,7 +4395,7 @@ static void manta_smoke_calc_transparency(FluidDomainSettings *fds, ViewLayer *v
int cell[3];
float t_ray = 1.0;
- /* Reset shadow value.*/
+ /* Reset shadow value. */
shadow[index] = -1.0f;
voxel_center[0] = (float)x;
@@ -5023,7 +5023,7 @@ void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd,
/* viscosity options */
tfds->viscosity_value = fds->viscosity_value;
- /* diffusion options*/
+ /* Diffusion options. */
tfds->surface_tension = fds->surface_tension;
tfds->viscosity_base = fds->viscosity_base;
tfds->viscosity_exponent = fds->viscosity_exponent;
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 8d1e6b26d4d..b9f0b97ab46 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -875,7 +875,7 @@ static void fcm_python_new_data(void *mdata)
{
FMod_Python *data = (FMod_Python *)mdata;
- /* everything should be set correctly by calloc, except for the prop->type constant.*/
+ /* Everything should be set correctly by calloc, except for the prop->type constant. */
data->prop = MEM_callocN(sizeof(IDProperty), "PyFModifierProps");
data->prop->type = IDP_GROUP;
}
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index eb0654274e1..95de9a9d636 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -1746,7 +1746,7 @@ void BKE_vfont_clipboard_set(const char32_t *text_buf, const CharInfo *info_buf,
char32_t *text;
CharInfo *info;
- /* clean previous buffers*/
+ /* Clean previous buffers. */
BKE_vfont_clipboard_free();
text = MEM_malloc_arrayN((len + 1), sizeof(*text), __func__);
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 64b5462f824..459fc5e4c68 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -195,12 +195,12 @@ static void greasepencil_blend_write(BlendWriter *writer, ID *id, const void *id
void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd)
{
- /* we must firstly have some grease-pencil data to link! */
+ /* We must firstly have some grease-pencil data to link! */
if (gpd == NULL) {
return;
}
- /* relink animdata */
+ /* Relink anim-data. */
BLO_read_data_address(reader, &gpd->adt);
BKE_animdata_blend_read_data(reader, gpd->adt);
@@ -219,7 +219,7 @@ void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd)
gpd->runtime.sbuffer_size = 0;
gpd->runtime.tot_cp_points = 0;
- /* relink palettes (old palettes deprecated, only to convert old files) */
+ /* Relink palettes (old palettes deprecated, only to convert old files). */
BLO_read_list(reader, &gpd->palettes);
if (gpd->palettes.first != NULL) {
LISTBASE_FOREACH (bGPDpalette *, palette, &gpd->palettes) {
@@ -227,14 +227,14 @@ void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd)
}
}
- /* materials */
+ /* Materials. */
BLO_read_pointer_array(reader, (void **)&gpd->mat);
- /* relink layers */
+ /* Relink layers. */
BLO_read_list(reader, &gpd->layers);
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
- /* relink frames */
+ /* Relink frames. */
BLO_read_list(reader, &gpl->frames);
BLO_read_data_address(reader, &gpl->actframe);
@@ -245,23 +245,23 @@ void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd)
BLO_read_list(reader, &gpl->mask_layers);
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
- /* relink strokes (and their points) */
+ /* Relink strokes (and their points). */
BLO_read_list(reader, &gpf->strokes);
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- /* relink stroke points array */
+ /* Relink stroke points array. */
BLO_read_data_address(reader, &gps->points);
- /* Relink geometry*/
+ /* Relink geometry. */
BLO_read_data_address(reader, &gps->triangles);
- /* relink stroke edit curve. */
+ /* Relink stroke edit curve. */
BLO_read_data_address(reader, &gps->editcurve);
if (gps->editcurve != NULL) {
- /* relink curve point array */
+ /* Relink curve point array. */
BLO_read_data_address(reader, &gps->editcurve->curve_points);
}
- /* relink weight data */
+ /* Relink weight data. */
if (gps->dvert) {
BLO_read_data_address(reader, &gps->dvert);
BKE_defvert_blend_read(reader, gps->totpoints, gps->dvert);
@@ -458,7 +458,7 @@ void BKE_gpencil_free_frames(bGPDlayer *gpl)
void BKE_gpencil_free_layer_masks(bGPDlayer *gpl)
{
- /* Free masks.*/
+ /* Free masks. */
bGPDlayer_Mask *mask_next = NULL;
for (bGPDlayer_Mask *mask = gpl->mask_layers.first; mask; mask = mask_next) {
mask_next = mask->next;
@@ -482,7 +482,7 @@ void BKE_gpencil_free_layers(ListBase *list)
/* free layers and their data */
BKE_gpencil_free_frames(gpl);
- /* Free masks.*/
+ /* Free masks. */
BKE_gpencil_free_layer_masks(gpl);
BLI_freelinkN(list, gpl);
diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c
index 906d0fb0792..74bb787eac3 100644
--- a/source/blender/blenkernel/intern/gpencil_curve.c
+++ b/source/blender/blenkernel/intern/gpencil_curve.c
@@ -243,7 +243,7 @@ static int gpencil_get_stroke_material_fromcurve(
/* If the curve has 2 materials, the first is considered as Fill and the second as Stroke.
* If the has only one material, if the name contains _stroke, the is used
- * as stroke, else as fill.*/
+ * as stroke, else as fill. */
if (ob_cu->totcol >= 2) {
*do_stroke = true;
*do_fill = true;
@@ -350,7 +350,7 @@ static void gpencil_convert_spline(Main *bmain,
/* Assign material index to stroke. */
gps->mat_nr = r_idx;
- /* Add stroke to frame.*/
+ /* Add stroke to frame. */
BLI_addtail(&gpf->strokes, gps);
float *coord_array = NULL;
diff --git a/source/blender/blenkernel/intern/gpencil_geom.c b/source/blender/blenkernel/intern/gpencil_geom.c
index 3aaa2eb76d1..2b16bbb10b2 100644
--- a/source/blender/blenkernel/intern/gpencil_geom.c
+++ b/source/blender/blenkernel/intern/gpencil_geom.c
@@ -2050,7 +2050,7 @@ void BKE_gpencil_stroke_subdivide(bGPdata *gpd, bGPDstroke *gps, int level, int
MEM_SAFE_FREE(temp_points);
MEM_SAFE_FREE(temp_dverts);
- /* move points to smooth stroke (not simple type )*/
+ /* Move points to smooth stroke (not simple type). */
if (type != GP_SUBDIV_SIMPLE) {
/* duplicate points in a temp area with the new subdivide data */
temp_points = MEM_dupallocN(gps->points);
@@ -2133,7 +2133,7 @@ void BKE_gpencil_stroke_merge_distance(bGPdata *gpd,
else {
pt->flag |= GP_SPOINT_TAG;
}
- /* Jump to next pair of points, keeping first point segment equals.*/
+ /* Jump to next pair of points, keeping first point segment equals. */
step++;
}
else {
@@ -2868,7 +2868,7 @@ static void gpencil_stroke_join_islands(bGPdata *gpd,
MDeformVert *dvert_src = NULL;
MDeformVert *dvert_dst = NULL;
- /* Copy weights (last before)*/
+ /* Copy weights (last before). */
e1 = 0;
e2 = 0;
for (int i = 0; i < totpoints; i++) {
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 578b8aa49d5..a67e78ceea0 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -54,15 +54,15 @@
static CLG_LogRef LOG = {"bke.idprop"};
-/*local size table.*/
+/* Local size table. */
static size_t idp_size_table[] = {
1, /*strings*/
sizeof(int),
sizeof(float),
- sizeof(float[3]), /*Vector type, deprecated*/
- sizeof(float[16]), /*Matrix type, deprecated*/
- 0, /*arrays don't have a fixed size*/
- sizeof(ListBase), /*Group type*/
+ sizeof(float[3]), /* Vector type, deprecated. */
+ sizeof(float[16]), /* Matrix type, deprecated. */
+ 0, /* Arrays don't have a fixed size. */
+ sizeof(ListBase), /* Group type. */
sizeof(void *),
sizeof(double),
};
@@ -99,12 +99,12 @@ IDProperty *IDP_CopyIDPArray(const IDProperty *array, const int flag)
narray->data.pointer = MEM_dupallocN(array->data.pointer);
for (int i = 0; i < narray->len; i++) {
- /* ok, the copy functions always allocate a new structure,
+ /* OK, the copy functions always allocate a new structure,
* which doesn't work here. instead, simply copy the
* contents of the new structure into the array cell,
* then free it. this makes for more maintainable
* code than simply re-implementing the copy functions
- * in this loop.*/
+ * in this loop. */
IDProperty *tmp = IDP_CopyProperty_ex(GETPROP(narray, i), flag);
memcpy(GETPROP(narray, i), tmp, sizeof(IDProperty));
MEM_freeN(tmp);
@@ -228,7 +228,7 @@ static void idp_resize_group_array(IDProperty *prop, int newlen, void *newarr)
}
}
-/*this function works for strings too!*/
+/* This function works for strings too! */
void IDP_ResizeArray(IDProperty *prop, int newlen)
{
const bool is_grow = newlen >= prop->len;
@@ -390,8 +390,8 @@ void IDP_ConcatStringC(IDProperty *prop, const char *st)
BLI_assert(prop->type == IDP_STRING);
int newlen = prop->len + (int)strlen(st);
- /* we have to remember that prop->len includes the null byte for strings.
- * so there's no need to add +1 to the resize function.*/
+ /* We have to remember that prop->len includes the null byte for strings.
+ * so there's no need to add +1 to the resize function. */
IDP_ResizeArray(prop, newlen);
strcat(prop->data.pointer, st);
}
@@ -400,8 +400,8 @@ void IDP_ConcatString(IDProperty *str1, IDProperty *append)
{
BLI_assert(append->type == IDP_STRING);
- /* since ->len for strings includes the NULL byte, we have to subtract one or
- * we'll get an extra null byte after each concatenation operation.*/
+ /* Since ->len for strings includes the NULL byte, we have to subtract one or
+ * we'll get an extra null byte after each concatenation operation. */
int newlen = str1->len + append->len - 1;
IDP_ResizeArray(str1, newlen);
strcat(str1->data.pointer, append->data.pointer);
@@ -775,10 +775,10 @@ IDProperty *IDP_GetProperties(ID *id, const bool create_if_needed)
if (create_if_needed) {
id->properties = MEM_callocN(sizeof(IDProperty), "IDProperty");
id->properties->type = IDP_GROUP;
- /* don't overwrite the data's name and type
+ /* NOTE(campbell): Don't overwrite the data's name and type
* some functions might need this if they
- * don't have a real ID, should be named elsewhere - Campbell */
- /* strcpy(id->name, "top_level_group");*/
+ * don't have a real ID, should be named elsewhere. */
+ // strcpy(id->name, "top_level_group");
}
return id->properties;
}
@@ -1219,7 +1219,7 @@ static void IDP_DirectLinkArray(IDProperty *prop, BlendDataReader *reader)
static void IDP_DirectLinkString(IDProperty *prop, BlendDataReader *reader)
{
- /*since we didn't save the extra string buffer, set totallen to len.*/
+ /* Since we didn't save the extra string buffer, set totallen to len. */
prop->totallen = prop->len;
BLO_read_data_address(reader, &prop->data.pointer);
}
@@ -1230,7 +1230,7 @@ static void IDP_DirectLinkGroup(IDProperty *prop, BlendDataReader *reader)
BLO_read_list(reader, lb);
- /*Link child id properties now*/
+ /* Link child id properties now. */
LISTBASE_FOREACH (IDProperty *, loop, &prop->data.group) {
IDP_DirectLinkProperty(loop, reader);
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 92ff7b4fcdb..a2131d735a6 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -3208,7 +3208,7 @@ Image *BKE_image_ensure_viewer(Main *bmain, int type, const char *name)
ima = image_alloc(bmain, name, IMA_SRC_VIEWER, type);
}
- /* happens on reload, imagewindow cannot be image user when hidden*/
+ /* Happens on reload, imagewindow cannot be image user when hidden. */
if (ima->id.us == 0) {
id_us_ensure_real(&ima->id);
}
@@ -4349,7 +4349,7 @@ static ImBuf *load_movie_single(Image *ima, ImageUser *iuser, int frame, const i
BKE_image_user_file_path(&iuser_t, ima, str);
- /* FIXME: make several stream accessible in image editor, too*/
+ /* FIXME: make several stream accessible in image editor, too. */
ia->anim = openanim(str, flags, 0, ima->colorspace_settings.name);
/* let's initialize this user */
diff --git a/source/blender/blenkernel/intern/image_save.c b/source/blender/blenkernel/intern/image_save.c
index e571499ba8e..b68cd9e4d2d 100644
--- a/source/blender/blenkernel/intern/image_save.c
+++ b/source/blender/blenkernel/intern/image_save.c
@@ -207,7 +207,7 @@ static bool image_save_single(ReportList *reports,
goto cleanup;
}
- /* it shouldn't ever happen*/
+ /* It shouldn't ever happen. */
if ((BLI_findstring(&rr->views, STEREO_LEFT_NAME, offsetof(RenderView, name)) == NULL) ||
(BLI_findstring(&rr->views, STEREO_RIGHT_NAME, offsetof(RenderView, name)) == NULL)) {
BKE_reportf(reports,
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 09ef71d5886..1edf83b6685 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -819,7 +819,7 @@ static void layer_collection_sync(ViewLayer *view_layer,
}
/* We separate restrict viewport and visible view layer because a layer collection can be
- * hidden in the view layer yet (locally) visible in a viewport (if it is not restricted).*/
+ * hidden in the view layer yet (locally) visible in a viewport (if it is not restricted). */
if (child_restrict & COLLECTION_RESTRICT_VIEWPORT) {
lc->runtime_flag |= LAYER_COLLECTION_RESTRICT_VIEWPORT;
}
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 6bef11dea76..f5d898e801b 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -158,7 +158,7 @@ static void metaball_blend_read_data(BlendDataReader *reader, ID *id)
mb->editelems = NULL;
/* Must always be cleared (meta's don't have their own edit-data). */
mb->needs_flush_to_id = 0;
- /* mb->edit_elems.first= mb->edit_elems.last= NULL;*/
+ // mb->edit_elems.first = mb->edit_elems.last = NULL;
mb->lastelem = NULL;
mb->batch_cache = NULL;
}
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 40b95f9535b..b518f35fac7 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -413,8 +413,7 @@ static const char *cmpcode_to_str(int code)
}
}
-/* thresh is threshold for comparing vertices, uvs, vertex colors,
- * weights, etc.*/
+/** Thresh is threshold for comparing vertices, UV's, vertex colors, weights, etc. */
static int customdata_compare(
CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2, const float thresh)
{
@@ -479,11 +478,11 @@ static int customdata_compare(
if (len_squared_v3v3(v1->co, v2->co) > thresh_sq) {
return MESHCMP_VERTCOMISMATCH;
}
- /* I don't care about normals, let's just do coordinates */
+ /* I don't care about normals, let's just do coordinates. */
}
}
- /*we're order-agnostic for edges here*/
+ /* We're order-agnostic for edges here. */
if (l1->type == CD_MEDGE) {
MEdge *e1 = l1->data;
MEdge *e2 = l2->data;
@@ -748,12 +747,14 @@ bool BKE_mesh_clear_facemap_customdata(struct Mesh *me)
return changed;
}
-/* this ensures grouped customdata (e.g. mtexpoly and mloopuv and mtface, or
+/**
+ * This ensures grouped customdata (e.g. mtexpoly and mloopuv and mtface, or
* mloopcol and mcol) have the same relative active/render/clone/mask indices.
*
- * note that for undo mesh data we want to skip 'ensure_tess_cd' call since
+ * NOTE(campbell): that for undo mesh data we want to skip 'ensure_tess_cd' call since
* we don't want to store memory for tessface when its only used for older
- * versions of the mesh. - campbell*/
+ * Versions of the mesh.
+ */
static void mesh_update_linked_customdata(Mesh *me, const bool do_ensure_tess_cd)
{
if (do_ensure_tess_cd) {
@@ -811,7 +812,7 @@ static void mesh_clear_geometry(Mesh *mesh)
/* Note that materials and shape keys are not freed here. This is intentional, as freeing
* shape keys requires tagging the depsgraph for updated relations, which is expensive.
- * Material slots should be kept in sync with the object.*/
+ * Material slots should be kept in sync with the object. */
mesh->totvert = 0;
mesh->totedge = 0;
diff --git a/source/blender/blenkernel/intern/mesh_boolean_convert.cc b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
index cfb1c192afe..5a8921132af 100644
--- a/source/blender/blenkernel/intern/mesh_boolean_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
@@ -304,7 +304,7 @@ static IMesh meshes_to_imesh(Span<const Mesh *> meshes,
r_info->mesh_edge_offset[mi] = e;
r_info->mesh_poly_offset[mi] = f;
/* Get matrix that transforms a coordinate in objects[mi]'s local space
- * to the target space space.*/
+ * to the target space space. */
const float4x4 objn_mat = (obmats[mi] == nullptr) ? float4x4::identity() :
clean_obmat(*obmats[mi]);
r_info->to_target_transform[mi] = inv_target_mat * objn_mat;
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 2260ffc668a..961c10ea5d3 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -3280,8 +3280,8 @@ void BKE_mesh_flush_select_from_polys_ex(MVert *mvert,
i = totpoly;
for (mp = mpoly; i--; mp++) {
- /* assume if its selected its not hidden and none of its verts/edges are hidden
- * (a common assumption)*/
+ /* Assume if its selected its not hidden and none of its verts/edges are hidden
+ * (a common assumption). */
if (mp->flag & ME_FACE_SEL) {
const MLoop *ml;
int j;
diff --git a/source/blender/blenkernel/intern/mesh_merge.c b/source/blender/blenkernel/intern/mesh_merge.c
index 29f3a8110f4..1e51ee73c7c 100644
--- a/source/blender/blenkernel/intern/mesh_merge.c
+++ b/source/blender/blenkernel/intern/mesh_merge.c
@@ -606,11 +606,11 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh,
MEM_freeN(poly_keys);
}
- /*create new cddm*/
+ /* Create new cddm. */
result = BKE_mesh_new_nomain_from_template(
mesh, STACK_SIZE(mvert), STACK_SIZE(medge), 0, STACK_SIZE(mloop), STACK_SIZE(mpoly));
- /*update edge indices and copy customdata*/
+ /* Update edge indices and copy customdata. */
med = medge;
for (i = 0; i < result->totedge; i++, med++) {
BLI_assert(newv[med->v1] != -1);
@@ -624,7 +624,7 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh,
CustomData_copy_data(&mesh->edata, &result->edata, olde[i], i, 1);
}
- /*update loop indices and copy customdata*/
+ /* Update loop indices and copy customdata. */
ml = mloop;
for (i = 0; i < result->totloop; i++, ml++) {
/* Edge remapping has already be done in main loop handling part above. */
@@ -634,19 +634,19 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh,
CustomData_copy_data(&mesh->ldata, &result->ldata, oldl[i], i, 1);
}
- /*copy vertex customdata*/
+ /* Copy vertex customdata. */
mv = mvert;
for (i = 0; i < result->totvert; i++, mv++) {
CustomData_copy_data(&mesh->vdata, &result->vdata, oldv[i], i, 1);
}
- /*copy poly customdata*/
+ /* Copy poly customdata. */
mp = mpoly;
for (i = 0; i < result->totpoly; i++, mp++) {
CustomData_copy_data(&mesh->pdata, &result->pdata, oldp[i], i, 1);
}
- /*copy over data. CustomData_add_layer can do this, need to look it up.*/
+ /* Copy over data. #CustomData_add_layer can do this, need to look it up. */
memcpy(result->mvert, mvert, sizeof(MVert) * STACK_SIZE(mvert));
memcpy(result->medge, medge, sizeof(MEdge) * STACK_SIZE(medge));
memcpy(result->mloop, mloop, sizeof(MLoop) * STACK_SIZE(mloop));
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 0f2f56f4f2b..3a7910d1a9f 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -1320,7 +1320,7 @@ static ImBuf *movieclip_get_postprocessed_ibuf(
clip->lastframe = framenr;
real_ibuf_size(clip, user, ibuf, &clip->lastsize[0], &clip->lastsize[1]);
- /* postprocess frame and put to cache if needed*/
+ /* Post-process frame and put to cache if needed. */
if (need_postprocess) {
ImBuf *tmpibuf = ibuf;
ibuf = postprocess_frame(clip, user, tmpibuf, flag, postprocess_flag);
@@ -2128,9 +2128,9 @@ GPUTexture *BKE_movieclip_get_gpu_texture(MovieClip *clip, MovieClipUser *cuser)
void BKE_movieclip_free_gputexture(struct MovieClip *clip)
{
- /* number of gpu textures to keep around as cache
+ /* Number of gpu textures to keep around as cache.
* We don't want to keep too many GPU textures for
- * movie clips around, as they can be large.*/
+ * movie clips around, as they can be large. */
const int MOVIECLIP_NUM_GPUTEXTURES = 1;
while (BLI_listbase_count(&clip->runtime.gputextures) > MOVIECLIP_NUM_GPUTEXTURES) {
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index bb7c1ef1f50..54f0da30a2b 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -994,7 +994,7 @@ static void multiresModifier_disp_run(
}
}
- /*numGrids = dm->getNumGrids(dm);*/ /*UNUSED*/
+ // numGrids = dm->getNumGrids(dm); /* UNUSED */
gridSize = dm->getGridSize(dm);
gridData = dm->getGridData(dm);
gridOffset = dm->getGridOffset(dm);
@@ -1285,7 +1285,7 @@ DerivedMesh *multires_make_derived_from_derived(
multires_set_tot_mdisps(me, mmd->totlvl);
multiresModifier_ensure_external_read(me, mmd);
- /*run displacement*/
+ /* Run displacement. */
multiresModifier_disp_run(result, ob->data, dm, APPLY_DISPLACEMENTS, subGridData, mmd->totlvl);
/* copy hidden elements for this level */
diff --git a/source/blender/blenkernel/intern/multires_reshape.c b/source/blender/blenkernel/intern/multires_reshape.c
index 04ad78ec0de..bd52d70b223 100644
--- a/source/blender/blenkernel/intern/multires_reshape.c
+++ b/source/blender/blenkernel/intern/multires_reshape.c
@@ -235,7 +235,7 @@ void multiresModifier_subdivide_to_level(struct Object *object,
/* Free original grids which makes it so smoothing with details thinks all the details were
* added against base mesh's limit surface. This is similar behavior to as if we've done all
- * displacement in sculpt mode at the old top level and then propagated to the new top level.*/
+ * displacement in sculpt mode at the old top level and then propagated to the new top level. */
multires_reshape_free_original_grids(&reshape_context);
if (ELEM(mode, MULTIRES_SUBDIVIDE_LINEAR, MULTIRES_SUBDIVIDE_SIMPLE)) {
diff --git a/source/blender/blenkernel/intern/multires_unsubdivide.c b/source/blender/blenkernel/intern/multires_unsubdivide.c
index 02b9bb852d6..4210f26a694 100644
--- a/source/blender/blenkernel/intern/multires_unsubdivide.c
+++ b/source/blender/blenkernel/intern/multires_unsubdivide.c
@@ -312,7 +312,7 @@ static bool unsubdivide_tag_disconnected_mesh_element(BMesh *bm, int *elem_id, i
/* Also try from the different 4 vertices of a quad in the current
* disconnected element ID. If a solution exists the search should return a valid solution from
- * one of these vertices.*/
+ * one of these vertices. */
BMFace *f, *init_face = NULL;
BMVert *v;
BMIter iter_a, iter_b;
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 92e21183acb..bf18765aa94 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -1289,7 +1289,7 @@ void BKE_nlastrip_set_active(AnimData *adt, NlaStrip *strip)
return;
}
- /* loop over tracks, deactivating*/
+ /* Loop over tracks, deactivating. */
for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
for (nls = nlt->strips.first; nls; nls = nls->next) {
if (nls != strip) {
@@ -1560,7 +1560,7 @@ bool BKE_nlatracks_have_animated_strips(ListBase *tracks)
return false;
}
-/* Validate the NLA-Strips 'control' F-Curves based on the flags set*/
+/* Validate the NLA-Strips 'control' F-Curves based on the flags set. */
void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
{
FCurve *fcu;
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index db18cecb5d3..cf0dd75ea9d 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -875,7 +875,7 @@ void ntreeBlendReadLib(struct BlendLibReader *reader, struct bNodeTree *ntree)
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
/* Link ID Properties -- and copy this comment EXACTLY for easy finding
- * of library blocks that implement this.*/
+ * of library blocks that implement this. */
IDP_BlendReadLib(reader, node->prop);
BLO_read_id_address(reader, lib, &node->id);
@@ -2365,7 +2365,7 @@ static void nodeUnMuteLink(bNodeLink *link)
link->tosock->flag |= SOCK_IN_USE;
}
-/* Upstream muting. Always happens when unmuting but checks when muting. O(n^2) algorithm.*/
+/* Upstream muting. Always happens when unmuting but checks when muting. O(n^2) algorithm. */
static void nodeMuteRerouteInputLinks(bNodeTree *ntree, bNode *node, const bool mute)
{
if (node->type != NODE_REROUTE) {
@@ -2388,7 +2388,7 @@ static void nodeMuteRerouteInputLinks(bNodeTree *ntree, bNode *node, const bool
}
}
-/* Downstream muting propagates when reaching reroute nodes. O(n^2) algorithm.*/
+/* Downstream muting propagates when reaching reroute nodes. O(n^2) algorithm. */
static void nodeMuteRerouteOutputLinks(bNodeTree *ntree, bNode *node, const bool mute)
{
if (node->type != NODE_REROUTE) {
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 0ee7cec59fc..314cc1a46cd 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2759,7 +2759,7 @@ Object *BKE_object_duplicate(Main *bmain,
}
if (!is_subprocess) {
- /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW.*/
+ /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW. */
BKE_libblock_relink_to_newid(&obn->id);
#ifndef NDEBUG
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index 9d53dad8d03..2e7152302c7 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -248,7 +248,7 @@ void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u, float
if (oc->_do_normals) {
ocr->normal[0] = BILERP(oc->_N_x);
- ocr->normal[1] = oc->_N_y /*BILERP(oc->_N_y) (MEM01)*/;
+ ocr->normal[1] = oc->_N_y /* BILERP(oc->_N_y) (MEM01) */;
ocr->normal[2] = BILERP(oc->_N_z);
}
@@ -347,7 +347,7 @@ void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u
}
if (oc->_do_normals) {
ocr->normal[0] = INTERP(oc->_N_x);
- ocr->normal[1] = oc->_N_y /*INTERP(oc->_N_y) (MEM01)*/;
+ ocr->normal[1] = oc->_N_y /* INTERP(oc->_N_y) (MEM01) */;
ocr->normal[2] = INTERP(oc->_N_z);
}
if (oc->_do_chop) {
@@ -1052,7 +1052,7 @@ void BKE_ocean_free_data(struct Ocean *oc)
fftw_destroy_plan(oc->_N_x_plan);
fftw_destroy_plan(oc->_N_z_plan);
MEM_freeN(oc->_N_x);
- /*fftwf_free(oc->_N_y); (MEM01)*/
+ /* fftwf_free(oc->_N_y); (MEM01) */
MEM_freeN(oc->_N_z);
}
@@ -1437,9 +1437,9 @@ void BKE_ocean_bake(struct Ocean *o,
rgb_to_rgba_unit_alpha(&ibuf_disp->rect_float[4 * (res_x * y + x)], ocr.disp);
if (o->_do_jacobian) {
- /* TODO, cleanup unused code - campbell */
+ /* TODO: cleanup unused code - campbell */
- float /*r, */ /* UNUSED */ pr = 0.0f, foam_result;
+ float /* r, */ /* UNUSED */ pr = 0.0f, foam_result;
float neg_disp, neg_eplus;
ocr.foam = BKE_ocean_jminus_to_foam(ocr.Jminus, och->foam_coverage);
@@ -1449,9 +1449,9 @@ void BKE_ocean_bake(struct Ocean *o,
pr = prev_foam[res_x * y + x];
}
- /* r = BLI_rng_get_float(rng); */ /* UNUSED */ /* randomly reduce foam */
+ // r = BLI_rng_get_float(rng); /* UNUSED */ /* randomly reduce foam */
- /* pr = pr * och->foam_fade; */ /* overall fade */
+ // pr = pr * och->foam_fade; /* overall fade */
/* Remember ocean coord sys is Y up!
* break up the foam where height (Y) is low (wave valley),
@@ -1475,7 +1475,7 @@ void BKE_ocean_bake(struct Ocean *o,
prev_foam[res_x * y + x] = foam_result;
- /*foam_result = min_ff(foam_result, 1.0f); */
+ // foam_result = min_ff(foam_result, 1.0f);
value_to_rgba_unit_alpha(&ibuf_foam->rect_float[4 * (res_x * y + x)], foam_result);
diff --git a/source/blender/blenkernel/intern/ocean_intern.h b/source/blender/blenkernel/intern/ocean_intern.h
index b55b211fa33..4ebd03789af 100644
--- a/source/blender/blenkernel/intern/ocean_intern.h
+++ b/source/blender/blenkernel/intern/ocean_intern.h
@@ -99,7 +99,7 @@ typedef struct Ocean {
double *_N_x; /* init w sim w via plan? */
/* all member of this array has same values,
* so convert this array to a float to reduce memory usage (MEM01). */
- /*float * _N_y; */
+ // float * _N_y;
double _N_y; /* sim w ********* can be rearranged? */
double *_N_z; /* init w sim w via plan? */
double *_disp_x; /* init w sim w via plan? */
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 021121034f1..d386967bf8b 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2462,7 +2462,7 @@ int do_guides(Depsgraph *depsgraph,
(int)(data->strength * guidetime * 100.0f),
100));
}
- else { /* curve size*/
+ else { /* Curve size. */
if (cu->flag & CU_PATH_RADIUS) {
mul_v3_fl(vec_to_point, radius);
}
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 0e806449bb9..c35f703b072 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -250,7 +250,7 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
if (psys->particles) {
totsaved = MIN2(psys->totpart, totpart);
- /*save old pars*/
+ /* Save old pars. */
if (totsaved) {
memcpy(newpars, psys->particles, totsaved * sizeof(ParticleData));
@@ -607,8 +607,8 @@ void init_particle(ParticleSimulationData *sim, ParticleData *pa)
pa->time = part->sta + (part->end - part->sta) * birth_time;
pa->hair_index = 0;
- /* we can't reset to -1 anymore since we've figured out correct index in distribute_particles */
- /* usage other than straight after distribute has to handle this index by itself - jahka*/
+ /* We can't reset to -1 anymore since we've figured out correct index in #distribute_particles
+ * usage other than straight after distribute has to handle this index by itself - jahka. */
// pa->num_dmcache = DMCACHE_NOTFOUND; /* assume we don't have a derived mesh face */
}
@@ -1473,7 +1473,7 @@ static void integrate_particle(
force_func(forcedata, states + i, force, impulse);
- /* force to acceleration*/
+ /* Force to acceleration. */
mul_v3_v3fl(acceleration, force, 1.0f / pa_mass);
if (external_acceleration) {
@@ -2226,7 +2226,7 @@ static void sph_integrate(ParticleSimulationData *sim,
sphdata->pass = 0;
// sphdata.element_size and sphdata.flow are set in the callback.
- /* restore previous state and treat gravity & effectors as external acceleration*/
+ /* Restore previous state and treat gravity & effectors as external acceleration. */
sub_v3_v3v3(effector_acceleration, pa->state.vel, pa->prev_state.vel);
mul_v3_fl(effector_acceleration, 1.0f / dtime);
@@ -3001,7 +3001,7 @@ static int collision_response(ParticleSimulationData *sim,
/* get back to global coordinates */
add_v3_v3(v1_tan, vc_tan);
- /* convert to angular velocity*/
+ /* Convert to angular velocity. */
cross_v3_v3v3(ave, vr_tan, pce->nor);
mul_v3_fl(ave, 1.0f / MAX2(pa->size, 0.001f));
@@ -3927,7 +3927,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
pa->alive = PARS_DYING;
}
else if (birthtime <= cfra && birthtime >= psys->cfra) {
- /* particle is born some time between this and last step*/
+ /* Particle is born some time between this and last step. */
reset_particle(sim, pa, dfra * timestep, cfra);
pa->alive = PARS_ALIVE;
pa->state.time = cfra - birthtime;
@@ -3936,7 +3936,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
/* nothing to be done when particle is dead */
}
- /* only reset unborn particles if they're shown or if the particle is born soon*/
+ /* Only reset unborn particles if they're shown or if the particle is born soon. */
if (pa->alive == PARS_UNBORN &&
(part->flag & PART_UNBORN || (cfra + psys->pointcache->step > pa->time))) {
reset_particle(sim, pa, dtime, cfra);
@@ -4104,7 +4104,7 @@ static void update_children(ParticleSimulationData *sim, const bool use_render_p
psys_free_children(sim->psys);
}
}
-/* updates cached particles' alive & other flags etc..*/
+/* Updates cached particles' alive & other flags etc. */
static void cached_step(ParticleSimulationData *sim, float cfra, const bool use_render_params)
{
ParticleSystem *psys = sim->psys;
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index d66503a0659..c2483b265a5 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -180,7 +180,7 @@ static BMVert *bm_vert_hash_lookup_chain(GHash *deleted_verts, BMVert *v)
while (true) {
BMVert **v_next_p = (BMVert **)BLI_ghash_lookup_p(deleted_verts, v);
if (v_next_p == NULL) {
- /* not remapped*/
+ /* Not remapped. */
return v;
}
if (*v_next_p == NULL) {
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 468f1d7b1ee..a05eb6962ce 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2632,7 +2632,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
}
#endif
- /*if (!G.relbase_valid) return; */ /* save blend file before using pointcache */
+ // if (!G.relbase_valid) return; /* Save blend file before using pointcache. */
/* clear all files in the temp dir with the prefix of the ID and the ".bphys" suffix */
switch (mode) {
@@ -2659,8 +2659,8 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
ptcache_filename_ext_append(pid, ext, 0, false, 0);
while ((de = readdir(dir)) != NULL) {
- if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
- if (STREQLEN(filename, de->d_name, len)) { /* do we have the right prefix */
+ if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
+ if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */
if (mode == PTCACHE_CLEAR_ALL) {
pid->cache->last_exact = MIN2(pid->cache->startframe, 0);
BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
@@ -2695,7 +2695,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
PTCacheMem *link = NULL;
if (mode == PTCACHE_CLEAR_ALL) {
- /*we want startframe if the cache starts before zero*/
+ /* We want startframe if the cache starts before zero. */
pid->cache->last_exact = MIN2(pid->cache->startframe, 0);
for (; pm; pm = pm->next) {
ptcache_mem_clear(pm);
@@ -2856,8 +2856,8 @@ void BKE_ptcache_id_time(
ptcache_filename_ext_append(pid, ext, 0, false, 0);
while ((de = readdir(dir)) != NULL) {
- if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
- if (STREQLEN(filename, de->d_name, len)) { /* do we have the right prefix */
+ if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
+ if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */
/* read the number of the file */
const int frame = ptcache_frame_from_filename(de->d_name, ext);
@@ -3038,7 +3038,7 @@ void BKE_ptcache_remove(void)
if (FILENAME_IS_CURRPAR(de->d_name)) {
/* do nothing */
}
- else if (strstr(de->d_name, PTCACHE_EXT)) { /* do we have the right extension?*/
+ else if (strstr(de->d_name, PTCACHE_EXT)) { /* Do we have the right extension? */
BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
BLI_delete(path_full, false, false);
}
@@ -3569,8 +3569,8 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const c
BLI_strncpy(pid->cache->name, name_dst, sizeof(pid->cache->name));
while ((de = readdir(dir)) != NULL) {
- if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
- if (STREQLEN(old_filename, de->d_name, len)) { /* do we have the right prefix */
+ if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
+ if (STREQLEN(old_filename, de->d_name, len)) { /* Do we have the right prefix. */
/* read the number of the file */
const int frame = ptcache_frame_from_filename(de->d_name, ext);
@@ -3589,7 +3589,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const c
void BKE_ptcache_load_external(PTCacheID *pid)
{
- /*todo*/
+ /* TODO: */
PointCache *cache = pid->cache;
int len; /* store the length of the string */
int info = 0;
@@ -3626,8 +3626,8 @@ void BKE_ptcache_load_external(PTCacheID *pid)
}
while ((de = readdir(dir)) != NULL) {
- if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
- if (STREQLEN(filename, de->d_name, len)) { /* do we have the right prefix */
+ if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
+ if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */
/* read the number of the file */
const int frame = ptcache_frame_from_filename(de->d_name, ext);
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 404e5cde40a..791116682c8 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2013,7 +2013,7 @@ Scene *BKE_scene_duplicate(Main *bmain, Scene *sce, eSceneCopyMethod type)
bmain, NULL, sce_copy->master_collection, duplicate_flags, LIB_ID_DUPLICATE_IS_SUBPROCESS);
if (!is_subprocess) {
- /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW.*/
+ /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW. */
BKE_libblock_relink_to_newid(&sce_copy->id);
#ifndef NDEBUG
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 7a5892baaf6..608317933f5 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -1703,9 +1703,9 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area)
BLO_read_list(reader, &sconsole->scrollback);
BLO_read_list(reader, &sconsole->history);
- /* comma expressions, (e.g. expr1, expr2, expr3) evaluate each expression,
+ /* Comma expressions, (e.g. expr1, expr2, expr3) evaluate each expression,
* from left to right. the right-most expression sets the result of the comma
- * expression as a whole*/
+ * expression as a whole. */
LISTBASE_FOREACH_MUTABLE (ConsoleLine *, cl, &sconsole->history) {
BLO_read_data_address(reader, &cl->line);
if (cl->line) {
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 441c77a91d1..123843c88db 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -109,11 +109,11 @@ typedef struct ReferenceVert {
} ReferenceVert;
typedef struct ReferenceState {
- float com[3]; /* center of mass*/
- ReferenceVert *ivert; /* list of initial values */
+ float com[3]; /* Center of mass. */
+ ReferenceVert *ivert; /* List of initial values. */
} ReferenceState;
-/*private scratch pad for caching and other data only needed when alive*/
+/* Private scratch pad for caching and other data only needed when alive. */
typedef struct SBScratch {
GHash *colliderhash;
short needstobuildcollider;
@@ -162,9 +162,9 @@ static float SoftHeunTol = 1.0f;
/* local prototypes */
static void free_softbody_intern(SoftBody *sb);
-/*+++ frame based timing +++*/
+/*+++ frame based timing +++ */
-/*physical unit of force is [kg * m / sec^2]*/
+/* Physical unit of force is `kg * m / sec^2`. */
/**
* Since unit of g is [m/sec^2] and F = mass * g we re-scale unit mass of node to 1 gram
@@ -207,7 +207,7 @@ static float sb_time_scale(Object *ob)
}
/*--- frame based timing ---*/
-/* helper functions for everything is animatable jow_go_for2_5 +++++++*/
+/* helper functions for everything is animatable jow_go_for2_5 +++++++ */
/* introducing them here, because i know: steps in properties ( at frame timing )
* will cause unwanted responses of the softbody system (which does inter frame calculations )
* so first 'cure' would be: interpolate linear in time ..
@@ -217,7 +217,7 @@ static float sb_time_scale(Object *ob)
*/
/* animate sb->maxgoal, sb->mingoal */
-static float _final_goal(Object *ob, BodyPoint *bp) /*jow_go_for2_5 */
+static float _final_goal(Object *ob, BodyPoint *bp) /* jow_go_for2_5 */
{
float f = -1999.99f;
if (ob) {
@@ -235,7 +235,7 @@ static float _final_goal(Object *ob, BodyPoint *bp) /*jow_go_for2_5 */
}
}
CLOG_ERROR(&LOG, "sb or bp == NULL");
- return f; /*using crude but spot able values some times helps debuggin */
+ return f; /* Using crude but spot able values some times helps debugging. */
}
static float _final_mass(Object *ob, BodyPoint *bp)
@@ -251,7 +251,7 @@ static float _final_mass(Object *ob, BodyPoint *bp)
}
/* helper functions for everything is animateble jow_go_for2_5 ------*/
-/*+++ collider caching and dicing +++*/
+/* +++ collider caching and dicing +++ */
/*
* for each target object/face the axis aligned bounding box (AABB) is stored
@@ -311,7 +311,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
/* blow it up with forcefield ranges */
hull = max_ff(ob->pd->pdef_sbift, ob->pd->pdef_sboft);
- /* alloc and copy verts*/
+ /* Allocate and copy verts. */
pccd_M->mvert = MEM_dupallocN(cmd->xnew);
/* note that xnew coords are already in global space, */
/* determine the ortho BB */
@@ -328,7 +328,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
pccd_M->bbmax[1] = max_ff(pccd_M->bbmax[1], v[1] + hull);
pccd_M->bbmax[2] = max_ff(pccd_M->bbmax[2], v[2] + hull);
}
- /* alloc and copy faces*/
+ /* Allocate and copy faces. */
pccd_M->tri = MEM_dupallocN(cmd->tri);
/* OBBs for idea1 */
@@ -401,7 +401,7 @@ static void ccd_mesh_update(Object *ob, ccd_Mesh *pccd_M)
MEM_freeN((void *)pccd_M->mprevvert);
}
pccd_M->mprevvert = pccd_M->mvert;
- /* alloc and copy verts*/
+ /* Allocate and copy verts. */
pccd_M->mvert = MEM_dupallocN(cmd->xnew);
/* note that xnew coords are already in global space, */
/* determine the ortho BB */
@@ -598,7 +598,7 @@ static int count_mesh_quads(Mesh *me)
static void add_mesh_quad_diag_springs(Object *ob)
{
Mesh *me = ob->data;
- /*BodyPoint *bp;*/ /*UNUSED*/
+ // BodyPoint *bp; /* UNUSED */
int a;
if (ob->soft) {
@@ -618,7 +618,7 @@ static void add_mesh_quad_diag_springs(Object *ob)
/* fill the tail */
a = 0;
bs = &ob->soft->bspring[ob->soft->totspring];
- /*bp= ob->soft->bpoint; */ /*UNUSED*/
+ // bp = ob->soft->bpoint; /* UNUSED */
for (a = me->totpoly; a > 0; a--, mp++) {
if (mp->totloop == 4) {
bs->v1 = mloop[mp->loopstart + 0].v;
@@ -640,7 +640,7 @@ static void add_mesh_quad_diag_springs(Object *ob)
static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *counter, int addsprings)
{
- /*assume we have a softbody*/
+ /* Assume we have a softbody. */
SoftBody *sb = ob->soft; /* is supposed to be there */
BodyPoint *bp, *bpo;
BodySpring *bs, *bs2, *bs3 = NULL;
@@ -654,7 +654,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count
bs3 = ob->soft->bspring + ob->soft->totspring;
}
for (a = sb->totpoint, bp = sb->bpoint; a > 0; a--, bp++) {
- /*scan for neighborhood*/
+ /* Scan for neighborhood. */
bpo = NULL;
v0 = (sb->totpoint - a);
for (b = bp->nofsprings; b > 0; b--) {
@@ -678,7 +678,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count
for (c = bpo->nofsprings; c > 0; c--) {
bs2 = sb->bspring + bpo->springs[c - 1];
if ((bs2->v1 != notthis) && (bs2->v1 > v0)) {
- (*counter)++; /*hit */
+ (*counter)++; /* hit */
if (addsprings) {
bs3->v1 = v0;
bs3->v2 = bs2->v1;
@@ -698,7 +698,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count
}
}
}
- /*scan for neighborhood done*/
+ /* Scan for neighborhood done. */
}
}
@@ -772,8 +772,8 @@ static void build_bps_springlist(Object *ob)
if (((sb->totpoint - a) == bs->v2)) {
add_bp_springlist(bp, sb->totspring - b);
}
- } /*for springs*/
- } /*for bp*/
+ } /* For springs. */
+ } /* For bp. */
}
static void calculate_collision_balls(Object *ob)
@@ -825,7 +825,7 @@ static void calculate_collision_balls(Object *ob)
else {
bp->colball = 0;
}
- } /*for bp*/
+ } /* For bp. */
}
/* creates new softbody if didn't exist yet, makes new points and springs arrays */
@@ -905,7 +905,7 @@ static void free_scratch(SoftBody *sb)
if (sb->scratch->colliderhash) {
BLI_ghash_free(sb->scratch->colliderhash,
NULL,
- (GHashValFreeFP)ccd_mesh_free); /*this hoepfully will free all caches*/
+ (GHashValFreeFP)ccd_mesh_free); /* This hopefully will free all caches. */
sb->scratch->colliderhash = NULL;
}
if (sb->scratch->bodyface) {
@@ -976,7 +976,7 @@ static void free_softbody_intern(SoftBody *sb)
* since that would only valid for 'slow' moving collision targets and dito particles
*/
-/* +++ dependency information functions*/
+/* +++ dependency information functions. */
/**
* \note collection overrides scene when not NULL.
@@ -990,9 +990,9 @@ static int query_external_colliders(Depsgraph *depsgraph, Collection *collection
return (numobjects != 0);
}
-/* --- dependency information functions*/
+/* --- dependency information functions. */
-/* +++ the aabb "force" section*/
+/* +++ the aabb "force" section. */
static int sb_detect_aabb_collisionCached(float UNUSED(force[3]),
struct Object *vertexowner,
float UNUSED(time))
@@ -1036,7 +1036,7 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]),
deflected = 2;
}
else {
- /*aye that should be cached*/
+ /* Aye that should be cached. */
CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
@@ -1048,9 +1048,9 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]),
BLI_ghashIterator_free(ihash);
return deflected;
}
-/* --- the aabb section*/
+/* --- the aabb section. */
-/* +++ the face external section*/
+/* +++ the face external section. */
static int sb_detect_face_pointCached(const float face_v1[3],
const float face_v2[3],
const float face_v3[3],
@@ -1104,13 +1104,13 @@ static int sb_detect_face_pointCached(const float face_v1[3],
}
}
else {
- /*aye that should be cached*/
+ /* Aye that should be cached. */
CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
- /* use mesh*/
+ /* Use mesh. */
if (mvert) {
while (a) {
copy_v3_v3(nv1, mvert[a - 1].co);
@@ -1118,7 +1118,7 @@ static int sb_detect_face_pointCached(const float face_v1[3],
mul_v3_fl(nv1, time);
madd_v3_v3fl(nv1, mprevvert[a - 1].co, 1.0f - time);
}
- /* origin to face_v2*/
+ /* Origin to face_v2. */
sub_v3_v3(nv1, face_v2);
facedist = dot_v3v3(nv1, d_nvect);
if (fabsf(facedist) < outerfacethickness) {
@@ -1139,7 +1139,7 @@ static int sb_detect_face_pointCached(const float face_v1[3],
}
}
a--;
- } /* while (a)*/
+ } /* while (a) */
} /* if (mvert) */
} /* if (ob->pd && ob->pd->deflect) */
BLI_ghashIterator_step(ihash);
@@ -1201,13 +1201,13 @@ static int sb_detect_face_collisionCached(const float face_v1[3],
}
}
else {
- /*aye that should be cached*/
+ /* Aye that should be cached. */
CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
- /* use mesh*/
+ /* Use mesh. */
while (a--) {
if ((aabbmax[0] < mima->minx) || (aabbmin[0] > mima->maxx) ||
(aabbmax[1] < mima->miny) || (aabbmin[1] > mima->maxy) ||
@@ -1235,7 +1235,7 @@ static int sb_detect_face_collisionCached(const float face_v1[3],
}
}
- /* switch origin to be nv2*/
+ /* Switch origin to be nv2. */
sub_v3_v3v3(edge1, nv1, nv2);
sub_v3_v3v3(edge2, nv3, nv2);
cross_v3_v3v3(d_nvect, edge2, edge1);
@@ -1272,7 +1272,7 @@ static void scan_for_ext_face_forces(Object *ob, float timenow)
bf = sb->scratch->bodyface;
for (a = 0; a < sb->scratch->totface; a++, bf++) {
bf->ext_force[0] = bf->ext_force[1] = bf->ext_force[2] = 0.0f;
- /*+++edges intruding*/
+ /*+++edges intruding. */
bf->flag &= ~BFF_INTERSECT;
zero_v3(feedback);
if (sb_detect_face_collisionCached(sb->bpoint[bf->v1].pos,
@@ -1289,9 +1289,9 @@ static void scan_for_ext_face_forces(Object *ob, float timenow)
bf->flag |= BFF_INTERSECT;
choke = min_ff(max_ff(damp, choke), 1.0f);
}
- /*---edges intruding*/
+ /*---edges intruding. */
- /*+++ close vertices*/
+ /*+++ close vertices. */
if ((bf->flag & BFF_INTERSECT) == 0) {
bf->flag &= ~BFF_CLOSEVERT;
tune = -1.0f;
@@ -1311,7 +1311,7 @@ static void scan_for_ext_face_forces(Object *ob, float timenow)
choke = min_ff(max_ff(damp, choke), 1.0f);
}
}
- /*--- close vertices*/
+ /*--- close vertices. */
}
bf = sb->scratch->bodyface;
for (a = 0; a < sb->scratch->totface; a++, bf++) {
@@ -1324,9 +1324,9 @@ static void scan_for_ext_face_forces(Object *ob, float timenow)
}
}
-/* --- the face external section*/
+/* --- the face external section. */
-/* +++ the spring external section*/
+/* +++ the spring external section. */
static int sb_detect_edge_collisionCached(const float edge_v1[3],
const float edge_v2[3],
@@ -1377,13 +1377,13 @@ static int sb_detect_edge_collisionCached(const float edge_v1[3],
}
}
else {
- /*aye that should be cached*/
+ /* Aye that should be cached. */
CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
- /* use mesh*/
+ /* Use mesh. */
while (a--) {
if ((aabbmax[0] < mima->minx) || (aabbmin[0] > mima->maxx) ||
(aabbmax[1] < mima->miny) || (aabbmin[1] > mima->maxy) ||
@@ -1411,7 +1411,7 @@ static int sb_detect_edge_collisionCached(const float edge_v1[3],
}
}
- /* switch origin to be nv2*/
+ /* Switch origin to be nv2. */
sub_v3_v3v3(edge1, nv1, nv2);
sub_v3_v3v3(edge2, nv3, nv2);
@@ -1469,12 +1469,12 @@ static void _scan_for_ext_spring_forces(
}
/* ---- springs colliding */
- /* +++ springs seeing wind ... n stuff depending on their orientation*/
- /* note we don't use sb->mediafrict but use sb->aeroedge for magnitude of effect*/
+ /* +++ springs seeing wind ... n stuff depending on their orientation. */
+ /* NOTE: we don't use `sb->mediafrict` but use `sb->aeroedge` for magnitude of effect. */
if (sb->aeroedge) {
float vel[3], sp[3], pr[3], force[3];
float f, windfactor = 0.25f;
- /*see if we have wind*/
+ /* See if we have wind. */
if (effectors) {
EffectedPoint epoint;
float speed[3] = {0.0f, 0.0f, 0.0f};
@@ -1543,7 +1543,7 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
/* figure the number of threads while preventing pretty pointless threading overhead */
totthread = BKE_scene_num_threads(scene);
- /* what if we got zillions of CPUs running but less to spread*/
+ /* What if we got zillions of CPUs running but less to spread. */
while ((totsprings / totthread < lowsprings) && (totthread > 1)) {
totthread--;
}
@@ -1590,7 +1590,7 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
BKE_effectors_free(effectors);
}
-/* --- the spring external section*/
+/* --- the spring external section. */
static int choose_winner(
float *w, float *pos, float *a, float *b, float *c, float *ca, float *cb, float *cc)
@@ -1683,7 +1683,7 @@ static int sb_detect_vertex_collisionCached(float opco[3],
}
}
else {
- /*aye that should be cached*/
+ /* Aye that should be cached. */
CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
@@ -1697,7 +1697,7 @@ static int sb_detect_vertex_collisionCached(float opco[3],
fa *= fa;
fa = 1.0f / fa;
avel[0] = avel[1] = avel[2] = 0.0f;
- /* use mesh*/
+ /* Use mesh. */
while (a--) {
if ((opco[0] < mima->minx) || (opco[0] > mima->maxx) || (opco[1] < mima->miny) ||
(opco[1] > mima->maxy) || (opco[2] < mima->minz) || (opco[2] > mima->maxz)) {
@@ -1733,7 +1733,7 @@ static int sb_detect_vertex_collisionCached(float opco[3],
}
}
- /* switch origin to be nv2*/
+ /* Switch origin to be nv2. */
sub_v3_v3v3(edge1, nv1, nv2);
sub_v3_v3v3(edge2, nv3, nv2);
/* Abuse dv1 to have vertex in question at *origin* of triangle. */
@@ -2068,7 +2068,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene,
bp->force[1] += -ks * (auxvect[1]);
bp->force[2] += -ks * (auxvect[2]);
- /* calculate damping forces generated by goals*/
+ /* Calculate damping forces generated by goals. */
sub_v3_v3v3(velgoal, bp->origS, bp->origE);
kd = sb->goalfrict * sb_fric_force_scale(ob);
add_v3_v3v3(auxvect, velgoal, bp->vec);
@@ -2113,7 +2113,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene,
pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint - bp, &epoint);
BKE_effectors_apply(effectors, NULL, sb->effector_weights, &epoint, force, NULL, speed);
- /* apply forcefield*/
+ /* Apply force-field. */
mul_v3_fl(force, fieldfactor * eval_sb_fric_force_scale);
add_v3_v3(bp->force, force);
@@ -2125,7 +2125,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene,
/* now we'll have nice centrifugal effect for vortex */
}
else {
- /* BP friction in media (not) moving*/
+ /* BP friction in media (not) moving. */
float kd = sb->mediafrict * sb_fric_force_scale(ob);
/* assume it to be proportional to actual velocity */
bp->force[0] -= bp->vec[0] * kd;
@@ -2160,7 +2160,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene,
/* +++springs */
iks = 1.0f / (1.0f - sb->inspring) - 1.0f; /* inner spring constants function */
if (ob->softflag & OB_SB_EDGES) {
- if (sb->bspring) { /* spring list exists at all ? */
+ if (sb->bspring) { /* Spring list exists at all? */
int b;
BodySpring *bs;
for (b = bp->nofsprings; b > 0; b--) {
@@ -2173,13 +2173,13 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene,
}
// sb_spring_force(Object *ob, int bpi, BodySpring *bs, float iks, float forcetime)
sb_spring_force(ob, ilast - bb, bs, iks, forcetime);
- } /* loop springs */
- } /* existing spring list */
- } /*any edges*/
+ } /* loop springs. */
+ } /* existing spring list. */
+ } /* Any edges. */
/* ---springs */
- } /*omit on snap */
- } /*loop all bp's*/
- return 0; /*done fine*/
+ } /* Omit on snap. */
+ } /* Loop all bp's. */
+ return 0; /* Done fine. */
}
static void *exec_softbody_calc_forces(void *data)
@@ -2220,7 +2220,7 @@ static void sb_cf_threads_run(Scene *scene,
/* figure the number of threads while preventing pretty pointless threading overhead */
totthread = BKE_scene_num_threads(scene);
- /* what if we got zillions of CPUs running but less to spread*/
+ /* What if we got zillions of CPUs running but less to spread. */
while ((totpoint / totthread < lowpoints) && (totthread > 1)) {
totthread--;
}
@@ -2275,11 +2275,11 @@ static void softbody_calc_forces(
* this will ruin adaptive stepsize AKA heun! (BM)
*/
SoftBody *sb = ob->soft; /* is supposed to be there */
- /*BodyPoint *bproot;*/ /* UNUSED */
- /* float gravity; */ /* UNUSED */
- /* float iks; */
+ // BodyPoint *bproot; /* UNUSED */
+ // float gravity; /* UNUSED */
+ // float iks;
float fieldfactor = -1.0f, windfactor = 0.25;
- int do_deflector /*, do_selfcollision*/, do_springcollision, do_aero;
+ int do_deflector /*, do_selfcollision */, do_springcollision, do_aero;
/* gravity = sb->grav * sb_grav_force_scale(ob); */ /* UNUSED */
@@ -2292,8 +2292,8 @@ static void softbody_calc_forces(
(ob->softflag & OB_SB_EDGECOLL);
do_aero = ((sb->aeroedge) && (ob->softflag & OB_SB_EDGES));
- /* iks = 1.0f/(1.0f-sb->inspring)-1.0f; */ /* inner spring constants function */ /* UNUSED */
- /* bproot= sb->bpoint; */ /* need this for proper spring addressing */ /* UNUSED */
+ // iks = 1.0f / (1.0f - sb->inspring) - 1.0f; /* Inner spring constants function. */ /* UNUSED */
+ // bproot = sb->bpoint; /* Need this for proper spring addressing. */ /* UNUSED */
if (do_springcollision || do_aero) {
sb_sfesf_threads_run(depsgraph, scene, ob, timenow, sb->totspring, NULL);
@@ -2489,7 +2489,7 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
/* used by heun when it overshoots */
static void softbody_restore_prev_step(Object *ob)
{
- SoftBody *sb = ob->soft; /* is supposed to be there*/
+ SoftBody *sb = ob->soft; /* is supposed to be there. */
BodyPoint *bp;
int a;
@@ -2502,7 +2502,7 @@ static void softbody_restore_prev_step(Object *ob)
#if 0
static void softbody_store_step(Object *ob)
{
- SoftBody *sb = ob->soft; /* is supposed to be there*/
+ SoftBody *sb = ob->soft; /* is supposed to be there. */
BodyPoint *bp;
int a;
@@ -2515,7 +2515,7 @@ static void softbody_store_step(Object *ob)
/* used by predictors and correctors */
static void softbody_store_state(Object *ob, float *ppos, float *pvel)
{
- SoftBody *sb = ob->soft; /* is supposed to be there*/
+ SoftBody *sb = ob->soft; /* is supposed to be there. */
BodyPoint *bp;
int a;
float *pp = ppos, *pv = pvel;
@@ -2533,7 +2533,7 @@ static void softbody_store_state(Object *ob, float *ppos, float *pvel)
/* used by predictors and correctors */
static void softbody_retrieve_state(Object *ob, float *ppos, float *pvel)
{
- SoftBody *sb = ob->soft; /* is supposed to be there*/
+ SoftBody *sb = ob->soft; /* is supposed to be there. */
BodyPoint *bp;
int a;
float *pp = ppos, *pv = pvel;
@@ -2551,7 +2551,7 @@ static void softbody_retrieve_state(Object *ob, float *ppos, float *pvel)
/* used by predictors and correctors */
static void softbody_swap_state(Object *ob, float *ppos, float *pvel)
{
- SoftBody *sb = ob->soft; /* is supposed to be there*/
+ SoftBody *sb = ob->soft; /* is supposed to be there. */
BodyPoint *bp;
int a;
float *pp = ppos, *pv = pvel;
@@ -2773,7 +2773,7 @@ static void mesh_faces_to_scratch(Object *ob)
MLoopTri *looptri, *lt;
BodyFace *bodyface;
int a;
- /* alloc and copy faces*/
+ /* Allocate and copy faces. */
sb->scratch->totface = poly_to_tri_count(me->totpoly, me->totloop);
looptri = lt = MEM_mallocN(sizeof(*looptri) * sb->scratch->totface, __func__);
@@ -3000,8 +3000,8 @@ static void curve_surf_to_softbody(Object *ob)
bp = sb->bpoint;
bs = sb->bspring;
- /* weights from bpoints, same code used as for mesh vertices */
- /* if ((ob->softflag & OB_SB_GOAL) && sb->vertgroup) 2.4x hack*/
+ /* Weights from bpoints, same code used as for mesh vertices. */
+ /* if ((ob->softflag & OB_SB_GOAL) && sb->vertgroup) 2.4x hack. */
/* new! take the weights from curve vertex anyhow */
if (ob->softflag & OB_SB_GOAL) {
setgoal = 1;
@@ -3022,10 +3022,10 @@ static void curve_surf_to_softbody(Object *ob)
if (setgoal) {
bp->goal *= bezt->weight;
- /* all three triples */
+ /* All three triples. */
(bp + 1)->goal = bp->goal;
(bp + 2)->goal = bp->goal;
- /*do not collide handles */
+ /* Do not collide handles. */
(bp + 1)->loc_flag |= SBF_OUTOFCOLLISION;
(bp + 2)->loc_flag |= SBF_OUTOFCOLLISION;
}
@@ -3137,7 +3137,7 @@ SoftBody *sbNew(void)
sb->inspring = 0.5f;
sb->infrict = 0.5f;
- /*todo backward file compat should copy inspring to inpush while reading old files*/
+ /* TODO: backward file compat should copy `inspring` to `inpush` while reading old files. */
sb->inpush = 0.5f;
sb->colball = 0.49f;
@@ -3150,7 +3150,7 @@ SoftBody *sbNew(void)
sb->choke = 3;
sb_new_scratch(sb);
- /*todo backward file compat should set sb->shearstiff = 1.0f while reading old files*/
+ /* TODO: backward file compat should set `sb->shearstiff = 1.0f` while reading old files. */
sb->shearstiff = 1.0f;
sb->solverflags |= SBSO_OLDERR;
@@ -3311,7 +3311,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
for (a = 0, bp = sb->bpoint; a < numVerts; a++, bp++) {
copy_v3_v3(bp->pos, vertexCos[a]);
- mul_m4_v3(ob->obmat, bp->pos); /* yep, sofbody is global coords*/
+ mul_m4_v3(ob->obmat, bp->pos); /* Yep, soft-body is global coords. */
copy_v3_v3(bp->origS, bp->pos);
copy_v3_v3(bp->origE, bp->pos);
copy_v3_v3(bp->origT, bp->pos);
@@ -3493,18 +3493,18 @@ static void softbody_step(
else if (sb->solver_ID == 2) {
/* do semi "fake" implicit euler */
/* removed */
- } /*SOLVER SELECT*/
+ } /* SOLVER SELECT */
else if (sb->solver_ID == 4) {
/* do semi "fake" implicit euler */
- } /*SOLVER SELECT*/
+ } /* SOLVER SELECT */
else if (sb->solver_ID == 3) {
/* do "stupid" semi "fake" implicit euler */
/* removed */
- } /*SOLVER SELECT*/
+ } /* SOLVER SELECT */
else {
CLOG_ERROR(&LOG, "softbody no valid solver ID!");
- } /*SOLVER SELECT*/
+ } /* SOLVER SELECT */
if (sb->plastic) {
apply_spring_memory(ob);
}
diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c
index 6f8a3d166e3..8b672b2cb49 100644
--- a/source/blender/blenkernel/intern/subdiv_ccg.c
+++ b/source/blender/blenkernel/intern/subdiv_ccg.c
@@ -1116,7 +1116,7 @@ typedef struct AverageGridsCornerData {
SubdivCCG *subdiv_ccg;
CCGKey *key;
- /* Optional lookup table. Maps task range index to index in subdiv_ccg->adjacent_vertices*/
+ /* Optional lookup table. Maps task range index to index in `subdiv_ccg->adjacent_vertices`. */
const int *adjacent_vert_index_map;
} AverageGridsCornerData;
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 23eccbfba9b..0dbfeaaaadb 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -580,16 +580,16 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss,
#endif
MVert *mvert = dm->getVertArray(dm);
MEdge *medge = dm->getEdgeArray(dm);
- /* MFace *mface = dm->getTessFaceArray(dm); */ /* UNUSED */
+ // MFace *mface = dm->getTessFaceArray(dm); /* UNUSED */
MVert *mv;
MEdge *me;
MLoop *mloop = dm->getLoopArray(dm), *ml;
MPoly *mpoly = dm->getPolyArray(dm), *mp;
- /*MFace *mf;*/ /*UNUSED*/
+ // MFace *mf; /* UNUSED */
int totvert = dm->getNumVerts(dm);
int totedge = dm->getNumEdges(dm);
- /*int totface = dm->getNumTessFaces(dm);*/ /*UNUSED*/
- /*int totpoly = dm->getNumFaces(dm);*/ /*UNUSED*/
+ // int totface = dm->getNumTessFaces(dm); /* UNUSED */
+ // int totpoly = dm->getNumFaces(dm); /* UNUSED */
int i, j;
int *index;
@@ -641,10 +641,10 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss,
fVerts[j] = POINTER_FROM_UINT(ml->v);
}
- /* this is very bad, means mesh is internally inconsistent.
+ /* This is very bad, means mesh is internally inconsistent.
* it is not really possible to continue without modifying
* other parts of code significantly to handle missing faces.
- * since this really shouldn't even be possible we just bail.*/
+ * since this really shouldn't even be possible we just bail. */
if (ccgSubSurf_syncFace(ss, POINTER_FROM_INT(i), mp->totloop, fVerts, &f) ==
eCCGError_InvalidValue) {
static int hasGivenError = 0;
@@ -1008,11 +1008,11 @@ static void ccgDM_getFinalFace(DerivedMesh *dm, int faceNum, MFace *mf)
int gridFaces = gridSideEdges * gridSideEdges;
int i;
CCGFace *f;
- /*int numVerts;*/
+ // int numVerts;
int offset;
int grid;
int x, y;
- /*int lastface = ccgSubSurf_getNumFaces(ss) - 1;*/ /*UNUSED*/
+ // int lastface = ccgSubSurf_getNumFaces(ss) - 1; /* UNUSED */
DMFlagMat *faceFlags = ccgdm->faceFlags;
memset(mf, 0, sizeof(*mf));
@@ -1023,7 +1023,7 @@ static void ccgDM_getFinalFace(DerivedMesh *dm, int faceNum, MFace *mf)
i = ccgdm->reverseFaceMap[faceNum];
f = ccgdm->faceMap[i].face;
- /*numVerts = ccgSubSurf_getFaceNumVerts(f);*/ /*UNUSED*/
+ // numVerts = ccgSubSurf_getFaceNumVerts(f); /* UNUSED */
offset = faceNum - ccgdm->faceMap[i].startFace;
grid = offset / gridFaces;
@@ -1781,7 +1781,7 @@ static void ccgdm_create_grids(DerivedMesh *dm)
numGrids = ccgDM_getNumGrids(dm);
numFaces = ccgSubSurf_getNumFaces(ss);
- /*gridSize = ccgDM_getGridSize(dm);*/ /*UNUSED*/
+ // gridSize = ccgDM_getGridSize(dm); /* UNUSED */
/* compute offset into grid array for each face */
gridOffset = MEM_mallocN(sizeof(int) * numFaces, "ccgdm.gridOffset");
@@ -2089,7 +2089,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
vertidx[s] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v));
}
- /*I think this is for interpolating the center vert?*/
+ /* I think this is for interpolating the center vert? */
w2 = w; // + numVerts*(g2_wid-1) * (g2_wid-1); //numVerts*((g2_wid-1) * g2_wid+g2_wid-1);
DM_interp_vert_data(dm, &ccgdm->dm, vertidx, w2, numVerts, vertNum);
if (vertOrigIndex) {
@@ -2099,7 +2099,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
vertNum++;
- /*interpolate per-vert data*/
+ /* Interpolate per-vert data. */
for (s = 0; s < numVerts; s++) {
for (x = 1; x < gridFaces; x++) {
w2 = w + s * numVerts * g2_wid * g2_wid + x * numVerts;
@@ -2114,7 +2114,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
}
}
- /*interpolate per-vert data*/
+ /* Interpolate per-vert data. */
for (s = 0; s < numVerts; s++) {
for (y = 1; y < gridFaces; y++) {
for (x = 1; x < gridFaces; x++) {
@@ -2138,7 +2138,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
}
for (s = 0; s < numVerts; s++) {
- /*interpolate per-face data*/
+ /* Interpolate per-face data. */
for (y = 0; y < gridFaces; y++) {
for (x = 0; x < gridFaces; x++) {
w2 = w + s * numVerts * g2_wid * g2_wid + (y * g2_wid + x) * numVerts;
@@ -2161,10 +2161,10 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
&dm->loopData, &ccgdm->dm.loopData, loopidx, w2, NULL, numVerts, loopindex2);
loopindex2++;
- /*copy over poly data, e.g. mtexpoly*/
+ /* Copy over poly data, e.g. mtexpoly. */
CustomData_copy_data(&dm->polyData, &ccgdm->dm.polyData, origIndex, faceNum, 1);
- /*set original index data*/
+ /* Set original index data. */
if (faceOrigIndex) {
/* reference the index in 'polyOrigIndex' */
*faceOrigIndex = faceNum;
diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c
index be67b2370e3..533107b2bf6 100644
--- a/source/blender/blenkernel/intern/workspace.c
+++ b/source/blender/blenkernel/intern/workspace.c
@@ -105,8 +105,8 @@ static void workspace_blend_read_data(BlendDataReader *reader, ID *id)
BLO_read_list(reader, &workspace->tools);
LISTBASE_FOREACH (WorkSpaceDataRelation *, relation, &workspace->hook_layout_relations) {
- /* parent pointer does not belong to workspace data and is therefore restored in lib_link step
- * of window manager.*/
+ /* Parent pointer does not belong to workspace data and is therefore restored in lib_link step
+ * of window manager. */
BLO_read_data_address(reader, &relation->value);
}