[Bf-blender-cvs] [910b8867476] master: Cleanup: comments (long lines) in modifiers
Campbell Barton
noreply at git.blender.org
Wed May 1 00:05:44 CEST 2019
Commit: 910b88674763899c189b694aa306e03055fe33bf
Author: Campbell Barton
Date: Wed May 1 07:40:07 2019 +1000
Branches: master
https://developer.blender.org/rB910b88674763899c189b694aa306e03055fe33bf
Cleanup: comments (long lines) in modifiers
Also remove duplicate comments in headers.
===================================================================
M source/blender/modifiers/intern/MOD_armature.c
M source/blender/modifiers/intern/MOD_array.c
M source/blender/modifiers/intern/MOD_bevel.c
M source/blender/modifiers/intern/MOD_correctivesmooth.c
M source/blender/modifiers/intern/MOD_datatransfer.c
M source/blender/modifiers/intern/MOD_dynamicpaint.c
M source/blender/modifiers/intern/MOD_explode.c
M source/blender/modifiers/intern/MOD_fluidsim_util.c
M source/blender/modifiers/intern/MOD_laplaciandeform.c
M source/blender/modifiers/intern/MOD_mask.c
M source/blender/modifiers/intern/MOD_normal_edit.c
M source/blender/modifiers/intern/MOD_ocean.c
M source/blender/modifiers/intern/MOD_screw.c
M source/blender/modifiers/intern/MOD_skin.c
M source/blender/modifiers/intern/MOD_solidify.c
M source/blender/modifiers/intern/MOD_surfacedeform.c
M source/blender/modifiers/intern/MOD_triangulate.c
M source/blender/modifiers/intern/MOD_util.c
M source/blender/modifiers/intern/MOD_weighted_normal.c
M source/blender/modifiers/intern/MOD_weightvg_util.c
M source/blender/modifiers/intern/MOD_weightvg_util.h
M source/blender/modifiers/intern/MOD_weightvgproximity.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index 31a1f5207c6..72215659915 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -93,7 +93,8 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
{
ArmatureModifierData *amd = (ArmatureModifierData *)md;
if (amd->object != NULL) {
- /* If not using envelopes, create relations to individual bones for more rigging flexibility. */
+ /* If not using envelopes,
+ * create relations to individual bones for more rigging flexibility. */
if ((amd->deformflag & ARM_DEF_ENVELOPE) == 0 && (amd->object->pose != NULL) &&
ELEM(ctx->object->type, OB_MESH, OB_LATTICE, OB_GPENCIL)) {
/* If neither vertex groups nor envelopes are used, the modifier has no bone dependencies. */
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 3443d275c81..fd6f58a21d4 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -148,7 +148,8 @@ static void svert_from_mvert(SortVertsElem *sv,
/**
* Take as inputs two sets of verts, to be processed for detection of doubles and mapping.
* Each set of verts is defined by its start within mverts array and its num_verts;
- * It builds a mapping for all vertices within source, to vertices within target, or -1 if no double found
+ * It builds a mapping for all vertices within source,
+ * to vertices within target, or -1 if no double found.
* The int doubles_map[num_verts_source] array must have been allocated by caller.
*/
static void dm_mvert_map_doubles(int *doubles_map,
@@ -220,11 +221,13 @@ static void dm_mvert_map_doubles(int *doubles_map,
target_scan_completed = true;
continue;
}
- /* Test target candidates starting at the low bound of possible doubles, ordered in terms of sumco */
+ /* Test target candidates starting at the low bound of possible doubles,
+ * ordered in terms of sumco. */
i_target = i_target_low_bound;
sve_target = sve_target_low_bound;
- /* i_target will scan vertices in the [v_source_sumco - dist3; v_source_sumco + dist3] range */
+ /* i_target will scan vertices in the
+ * [v_source_sumco - dist3; v_source_sumco + dist3] range */
while ((i_target < target_num_verts) && (sve_target->sum_co <= sve_source_sumco + dist3)) {
/* Testing distance for candidate double in target */
@@ -237,8 +240,9 @@ static void dm_mvert_map_doubles(int *doubles_map,
/* If target is already mapped, we only follow that mapping if final target remains
* close enough from current vert (otherwise no mapping at all).
- * Note that if we later find another target closer than this one, then we check it. But if other
- * potential targets are farther, then there will be no mapping at all for this source. */
+ * Note that if we later find another target closer than this one, then we check it.
+ * But if other potential targets are farther,
+ * then there will be no mapping at all for this source. */
while (best_target_vertex != -1 &&
!ELEM(doubles_map[best_target_vertex], -1, best_target_vertex)) {
if (compare_len_v3v3(mverts[sve_source->vertex_num].co,
@@ -720,7 +724,8 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
for (i = 0; i < result_nverts; i++) {
int new_i = full_doubles_map[i];
if (new_i != -1) {
- /* We have to follow chains of doubles (merge start/end especially is likely to create some),
+ /* We have to follow chains of doubles
+ * (merge start/end especially is likely to create some),
* those are not supported at all by BKE_mesh_merge_verts! */
while (!ELEM(full_doubles_map[new_i], -1, new_i)) {
new_i = full_doubles_map[new_i];
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index 02d3bd305be..26b45bbef0d 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -110,19 +110,19 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
const int miter_inner = bmd->miter_inner;
const float spread = bmd->spread;
- bm = BKE_mesh_to_bmesh_ex(
- mesh,
- &(struct BMeshCreateParams){0},
- &(struct BMeshFromMeshParams){
- .calc_face_normal = true,
- .add_key_index = false,
- .use_shapekey = false,
- .active_shapekey = 0,
- /* XXX We probably can use CD_MASK_BAREMESH_ORIGDINDEX here instead (also for other modifiers cases)? */
- .cd_mask_extra = {.vmask = CD_MASK_ORIGINDEX,
- .emask = CD_MASK_ORIGINDEX,
- .pmask = CD_MASK_ORIGINDEX},
- });
+ bm = BKE_mesh_to_bmesh_ex(mesh,
+ &(struct BMeshCreateParams){0},
+ &(struct BMeshFromMeshParams){
+ .calc_face_normal = true,
+ .add_key_index = false,
+ .use_shapekey = false,
+ .active_shapekey = 0,
+ /* XXX We probably can use CD_MASK_BAREMESH_ORIGDINDEX here instead
+ * (also for other modifiers cases)? */
+ .cd_mask_extra = {.vmask = CD_MASK_ORIGINDEX,
+ .emask = CD_MASK_ORIGINDEX,
+ .pmask = CD_MASK_ORIGINDEX},
+ });
if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) {
MOD_get_vgroup(ctx->object, mesh, bmd->defgrp_name, &dvert, &vgroup);
diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c
index 2a332bc9709..705ffb266c5 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.c
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c
@@ -307,7 +307,8 @@ static void smooth_iter__length_weight(CorrectiveSmoothModifierData *csmd,
/* fast-path */
for (i = 0; i < numVerts; i++) {
struct SmoothingData_Weighted *sd = &smooth_data[i];
- /* divide by sum of all neighbour distances (weighted) and amount of neighbors, (mean average) */
+ /* Divide by sum of all neighbour distances (weighted) and amount of neighbors,
+ * (mean average). */
const float div = sd->edge_length_sum * vertex_edge_count[i];
if (div > eps) {
#if 0
diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c
index 4de99ea6fe6..3235d64cbbb 100644
--- a/source/blender/modifiers/intern/MOD_datatransfer.c
+++ b/source/blender/modifiers/intern/MOD_datatransfer.c
@@ -179,8 +179,8 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
if (((result == me) || (me->mvert == result->mvert) || (me->medge == result->medge)) &&
(dtmd->data_types & DT_TYPES_AFFECT_MESH)) {
- /* We need to duplicate data here, otherwise setting custom normals, edges' shaprness, etc., could
- * modify org mesh, see T43671. */
+ /* We need to duplicate data here, otherwise setting custom normals, edges' shaprness, etc.,
+ * could modify org mesh, see T43671. */
BKE_id_copy_ex(NULL, &me_mod->id, (ID **)&result, LIB_ID_COPY_LOCALIZE);
}
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c
index ccd71455b21..ce488a224aa 100644
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@ -129,7 +129,8 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
ctx->node, ctx->object, surface->effector_weights, true, 0, "Dynamic Paint Field");
}
- /* Actual code uses custom loop over group/scene without layer checks in dynamicPaint_doStep */
+ /* Actual code uses custom loop over group/scene
+ * without layer checks in dynamicPaint_doStep. */
DEG_add_collision_relations(ctx->node,
ctx->object,
surface->brush_group,
@@ -167,7 +168,7 @@ static void foreachTexLink(ModifierData *UNUSED(md),
TexWalkFunc UNUSED(walk),
void *UNUSED(userData))
{
- //walk(userData, ob, md, ""); /* re-enable when possible */
+ // walk(userData, ob, md, ""); /* re-enable when possible */
}
ModifierTypeInfo modifierType_DynamicPaint = {
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index 7d87ba240d5..4ed787810a8 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -743,7 +743,7 @@ static Mesh *cutEdges(ExplodeModifierData *emd, Mesh *mesh)
* have to stop using tessface - campbell */
facepa = MEM_calloc_arrayN((totface + (totfsplit * 2)), sizeof(int), "explode_facepa");
- //memcpy(facepa, emd->facepa, totface*sizeof(int));
+ // memcpy(facepa, emd->facepa, totface*sizeof(int));
emd->facepa = facepa;
/* create new verts */
@@ -766,7 +766,7 @@ static Mesh *cutEdges(ExplodeModifierData *emd, Mesh *mesh)
/* create new faces */
curdupface = 0; //=totface;
- //curdupin=totesplit;
+ // curdupin=totesplit;
for (i = 0, fs = facesplit; i < totface; i++, fs++) {
mf = &mesh->mface[i];
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index 3744c527983..0776806f541 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -435,8 +435,10 @@ static Mesh *fluidsim_read_cache(
Object *ob, Mesh *orgmesh, FluidsimModifierData *fluidmd, int framenr, int useRenderParams)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list