diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
commit | 89a963fb7fdff543b77de790355b9dac3019bd33 (patch) | |
tree | 4e1d2245e20f8c21625e99d771776f66c233a0de /source/blender/modifiers/intern | |
parent | de4bd55e01bc574c13977537ace1a0901dcfcaf0 (diff) |
style cleanup: comment blocks
Diffstat (limited to 'source/blender/modifiers/intern')
18 files changed, 73 insertions, 72 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 9eeffcc1488..2fbec392b1e 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -66,8 +66,8 @@ static void initData(ModifierData *md) ArrayModifierData *amd = (ArrayModifierData*) md; /* default to 2 duplicates distributed along the x-axis by an - offset of 1 object-width - */ + * offset of 1 object-width + */ amd->start_cap = amd->end_cap = amd->curve_ob = amd->offset_ob = NULL; amd->count = 2; amd->offset[0] = amd->offset[1] = amd->offset[2] = 0; @@ -264,14 +264,14 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, } /* calculate the maximum number of copies which will fit within the - prescribed length */ + * prescribed length */ if(amd->fit_type == MOD_ARR_FITLENGTH || amd->fit_type == MOD_ARR_FITCURVE) { float dist = sqrt(dot_v3v3(offset[3], offset[3])); if(dist > 1e-6f) /* this gives length = first copy start to last copy end - add a tiny offset for floating point rounding errors */ + * add a tiny offset for floating point rounding errors */ count = (length + 1e-6f) / dist; else /* if the offset has no translation, just make one copy */ @@ -282,11 +282,11 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, count = 1; /* BMESH_TODO: bumping up the stack level avoids computing the normals - after every top-level operator execution (and this modifier has the - potential to execute a *lot* of top-level BMOps. There should be a - cleaner way to do this. One possibility: a "mirror" BMOp would - certainly help by compressing it all into one top-level BMOp that - executes a lot of second-level BMOps. */ + * after every top-level operator execution (and this modifier has the + * potential to execute a *lot* of top-level BMOps. There should be a + * cleaner way to do this. One possibility: a "mirror" BMOp would + * certainly help by compressing it all into one top-level BMOp that + * executes a lot of second-level BMOps. */ BMO_push(em->bm, NULL); bmesh_edit_begin(em->bm, 0); @@ -349,8 +349,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_op_finish(em->bm, &findop); } - /*generate merge mappping using index map. we do this by using the - operator slots as lookup arrays.*/ + /* generate merge mappping using index map. we do this by using the + * operator slots as lookup arrays.*/ #define E(i) (i) < s1->len ? _E(s1, i) : _E(s2, (i)-s1->len) for (i=0; i<indexLen; i++) { diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 92584800f98..3e110909702 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -173,12 +173,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), options = bmd->flags|bmd->val_flags|bmd->lim_flags|bmd->e_flags; - /*if ((options & BME_BEVEL_VWEIGHT) && bmd->defgrp_name[0]) { +#if 0 + if ((options & BME_BEVEL_VWEIGHT) && bmd->defgrp_name[0]) { defgrp_index = defgroup_name_index(ob, bmd->defgrp_name); if (defgrp_index < 0) { options &= ~BME_BEVEL_VWEIGHT; } - }*/ + } +#endif bm = BME_derivedmesh_to_bmesh(derivedData); BME_bevel(bm,bmd->value,bmd->res,options,defgrp_index,bmd->bevel_angle,NULL); diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 72e54754498..76560d14e3b 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -133,8 +133,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *result; /* when one of objects is empty (has got no faces) we could speed up - calculation a bit returning one of objects' derived meshes (or empty one) - Returning mesh is depended on modifieier's operation (sergey) */ + * calculation a bit returning one of objects' derived meshes (or empty one) + * Returning mesh is depended on modifieier's operation (sergey) */ result = get_quick_derivedMesh(derivedData, dm, bmd->operation); if(result == NULL) { @@ -151,7 +151,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } /* if new mesh returned, return it; otherwise there was - * an error, so delete the modifier object */ + * an error, so delete the modifier object */ if(result) return result; else diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c index 04b6bf33b1e..3fd4119c915 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.c +++ b/source/blender/modifiers/intern/MOD_boolean_util.c @@ -333,7 +333,7 @@ static void InterpCSGFace( } /* Iterate over the CSG Output Descriptors and create a new DerivedMesh - from them */ + * from them */ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh( CSG_FaceIteratorDescriptor *face_it, CSG_VertexIteratorDescriptor *vertex_it, diff --git a/source/blender/modifiers/intern/MOD_boolean_util.h b/source/blender/modifiers/intern/MOD_boolean_util.h index 8e3617cf74e..6ba4940a4e9 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.h +++ b/source/blender/modifiers/intern/MOD_boolean_util.h @@ -39,15 +39,15 @@ struct Base; struct DerivedMesh; /* Performs a boolean between two mesh objects, it is assumed that both objects - are in fact a mesh object. On success returns 1 and creates a new mesh object - into blender data structures. On failure returns 0 and reports an error. */ + * are in fact a mesh object. On success returns 1 and creates a new mesh object + * into blender data structures. On failure returns 0 and reports an error. */ int NewBooleanMesh(struct Scene *scene, struct Base *base, struct Base *base_select, int op); /* Performs a boolean between two mesh objects, it is assumed that both objects - are in fact mesh object. On success returns a DerivedMesh. On failure - returns NULL and reports an error. */ - + * are in fact mesh object. On success returns a DerivedMesh. On failure + * returns NULL and reports an error. */ + struct DerivedMesh *NewBooleanDerivedMesh(struct DerivedMesh *dm, struct Object *ob, struct DerivedMesh *dm_select, struct Object *ob_select, int int_op_type); #endif // MOD_BOOLEAN_UTILS diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index b7f25f126cd..a268f475bc8 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -192,8 +192,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), } } - /* get the set of edges that will be in the new mesh - */ + /* get the set of edges that will be in the new mesh */ for (i = 0; i < numEdges_dst; i++) { j = BLI_ghash_size(edgeHash); diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 7de8a8f7923..6ca3a82dd0e 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -154,8 +154,8 @@ static void sphere_do( ctrl_ob = cmd->object; /* spherify's center is {0, 0, 0} (the ob's own center in its local - * space), by default, but if the user defined a control object, - * we use its location, transformed to ob's local space */ + * space), by default, but if the user defined a control object, + * we use its location, transformed to ob's local space */ if (ctrl_ob) { if(flag & MOD_CAST_USE_OB_TRANSFORM) { invert_m4_m4(ctrl_ob->imat, ctrl_ob->obmat); @@ -171,11 +171,11 @@ static void sphere_do( /* 1) (flag was checked in the "if (ctrl_ob)" block above) */ /* 2) cmd->radius > 0.0f: only the vertices within this radius from - * the center of the effect should be deformed */ + * the center of the effect should be deformed */ if (cmd->radius > FLT_EPSILON) has_radius = 1; /* 3) if we were given a vertex group name, - * only those vertices should be affected */ + * only those vertices should be affected */ modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index); if(flag & MOD_CAST_SIZE_FROM_RADIUS) { @@ -195,10 +195,10 @@ static void sphere_do( } /* ready to apply the effect, one vertex at a time; - * tiny optimization: the code is separated (with parts repeated) + * tiny optimization: the code is separated (with parts repeated) * in two possible cases: - * with or w/o a vgroup. With lots of if's in the code below, - * further optimization's are possible, if needed */ + * with or w/o a vgroup. With lots of if's in the code below, + * further optimization's are possible, if needed */ if (dvert) { /* with a vgroup */ MDeformVert *dv= dvert; float fac_orig = fac; @@ -321,11 +321,11 @@ static void cuboid_do( /* 1) (flag was checked in the "if (ctrl_ob)" block above) */ /* 2) cmd->radius > 0.0f: only the vertices within this radius from - * the center of the effect should be deformed */ + * the center of the effect should be deformed */ if (cmd->radius > FLT_EPSILON) has_radius = 1; /* 3) if we were given a vertex group name, - * only those vertices should be affected */ + * only those vertices should be affected */ modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index); if (ctrl_ob) { @@ -352,12 +352,12 @@ static void cuboid_do( } else { /* get bound box */ /* We can't use the object's bound box because other modifiers - * may have changed the vertex data. */ + * may have changed the vertex data. */ INIT_MINMAX(min, max); /* Cast's center is the ob's own center in its local space, - * by default, but if the user defined a control object, we use - * its location, transformed to ob's local space. */ + * by default, but if the user defined a control object, we use + * its location, transformed to ob's local space. */ if (ctrl_ob) { float vec[3]; @@ -393,10 +393,10 @@ static void cuboid_do( bb[4][2] = bb[5][2] = bb[6][2] = bb[7][2] = max[2]; /* ready to apply the effect, one vertex at a time; - * tiny optimization: the code is separated (with parts repeated) + * tiny optimization: the code is separated (with parts repeated) * in two possible cases: - * with or w/o a vgroup. With lots of if's in the code below, - * further optimization's are possible, if needed */ + * with or w/o a vgroup. With lots of if's in the code below, + * further optimization's are possible, if needed */ if (dvert) { /* with a vgroup */ float fac_orig = fac; for (i = 0; i < numVerts; i++) { @@ -434,10 +434,10 @@ static void cuboid_do( /* The algo used to project the vertices to their * bounding box (bb) is pretty simple: * for each vertex v: - * 1) find in which octant v is in; - * 2) find which outer "wall" of that octant is closer to v; - * 3) calculate factor (var fbb) to project v to that wall; - * 4) project. */ + * 1) find in which octant v is in; + * 2) find which outer "wall" of that octant is closer to v; + * 3) calculate factor (var fbb) to project v to that wall; + * 4) project. */ /* find in which octant this vertex is in */ octant = 0; @@ -471,7 +471,7 @@ static void cuboid_do( continue; /* finally, this is the factor we wanted, to project the vertex - * to its bounding box (bb) */ + * to its bounding box (bb) */ fbb = apex[coord] / tmp_co[coord]; /* calculate the new vertex position */ diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index c9831959adb..481ab805c5a 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -115,8 +115,7 @@ static void initData(ModifierData *md) { EdgeSplitModifierData *emd = (EdgeSplitModifierData*) md; - /* default to 30-degree split angle, sharpness from both angle & flag - */ + /* default to 30-degree split angle, sharpness from both angle & flag */ emd->split_angle = 30; emd->flags = MOD_EDGESPLIT_FROMANGLE | MOD_EDGESPLIT_FROMFLAG; } diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index e9563b55d47..42a6f74aba5 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -131,11 +131,11 @@ void fluidsim_init(FluidsimModifierData *fluidmd) fss->cpsQuality = 10.0; // 1.0 / 10.0 => means 0.1 width /* - BAD TODO: this is done in buttons_object.c in the moment - Mesh *mesh = ob->data; - // calculate bounding box - fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize); - */ + * BAD TODO: this is done in buttons_object.c in the moment + * Mesh *mesh = ob->data; + * // calculate bounding box + * fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize); + */ fss->meshVelocities = NULL; diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 769ad864d98..00572eaad86 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -96,7 +96,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm, } else if(sculpting) { /* would be created on the fly too, just nicer this - way on first stroke after e.g. switching levels */ + * way on first stroke after e.g. switching levels */ ss->pbvh= result->getPBVH(ob, result); } diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index 10e43afebe2..ad8642497fb 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -111,7 +111,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) } /* particles only need this if they are after a non deform modifier, and - * the modifier stack will only create them in that case. */ + * the modifier stack will only create them in that case. */ dataMask |= CD_MASK_ORIGSPACE_MLOOP|CD_MASK_ORIGINDEX; dataMask |= CD_MASK_ORCO; diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c index ec893a3bf44..a608defc434 100644 --- a/source/blender/modifiers/intern/MOD_remesh.c +++ b/source/blender/modifiers/intern/MOD_remesh.c @@ -90,7 +90,7 @@ static void init_dualcon_mesh(DualConInput *mesh, DerivedMesh *dm) } /* simple structure to hold the output: a CDDM and two counters to - keep track of the current elements */ + * keep track of the current elements */ typedef struct { DerivedMesh *dm; int curvert, curface; diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index 496d41b1550..f88c49fc6d7 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -543,19 +543,22 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, ed_loop_flip= 0; } - }/* else { + } +#if 0 + else { printf("No Connected ___\n"); - }*/ + } +#endif /*printf("flip direction %i\n", ed_loop_flip);*/ /* switch the flip option if set * note: flip is now done at face level so copying vgroup slizes is easier */ - /* +#if 0 if (do_flip) ed_loop_flip= !ed_loop_flip; - */ +#endif if (angle < 0.0f) ed_loop_flip= !ed_loop_flip; diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index 88c21eea806..9fb72bb4abc 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -315,7 +315,7 @@ static void deformVerts(ModifierData *md, Object *ob, CustomDataMask dataMask = requiredDataMask(ob, md); /* we implement requiredDataMask but thats not really useful since - mesh_calc_modifiers pass a NULL derivedData */ + * mesh_calc_modifiers pass a NULL derivedData */ if(dataMask) dm= get_dm(ob, NULL, dm, NULL, 0); @@ -335,7 +335,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, CustomDataMask dataMask = requiredDataMask(ob, md); /* we implement requiredDataMask but thats not really useful since - mesh_calc_modifiers pass a NULL derivedData */ + * mesh_calc_modifiers pass a NULL derivedData */ if(dataMask) dm= get_dm(ob, editData, dm, NULL, 0); diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c index 01b012655d0..7b7597af6d6 100644 --- a/source/blender/modifiers/intern/MOD_smooth.c +++ b/source/blender/modifiers/intern/MOD_smooth.c @@ -124,7 +124,7 @@ static void smoothModifier_do( modifier_get_vgroup(ob, dm, smd->defgrp_name, &dvert, &defgrp_index); /* NOTICE: this can be optimized a little bit by moving the - * if (dvert) out of the loop, if needed */ + * if (dvert) out of the loop, if needed */ for (j = 0; j < smd->repeat; j++) { for (i = 0; i < numDMEdges; i++) { float fvec[3]; diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 78178387ee9..b7c820991f1 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -77,11 +77,11 @@ static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3]) /* we don't want to overwrite any referenced layers */ - /* - Doesn't work here! + /* Doesn't work here! */ +#if 0 mv = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MVERT, numVerts); cddm->mvert = mv; - */ +#endif face_nors = CustomData_get_layer(&dm->polyData, CD_NORMAL); if(!face_nors) { diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 5f8c29944bd..11bf5bc6edf 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -65,9 +65,9 @@ void get_texture_value(Tex *texture, float *tex_co, TexResult *texres) result_type = multitex_ext_safe(texture, tex_co, texres); /* if the texture gave an RGB value, we assume it didn't give a valid - * intensity, so calculate one (formula from do_material_tex). - * if the texture didn't give an RGB value, copy the intensity across - */ + * intensity, so calculate one (formula from do_material_tex). + * if the texture didn't give an RGB value, copy the intensity across + */ if(result_type & TEX_RGB) texres->tin = (0.35f * texres->tr + 0.45f * texres->tg + 0.2f * texres->tb); diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index e5fa0a323df..cd4858fcb4d 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -315,9 +315,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, } while (fidx--); } } else { - /* multiple projectors, select the closest to face normal - * direction - */ + /* multiple projectors, select the closest to face normal direction */ float face_no[3]; int j; Projector *best_projector; @@ -327,8 +325,8 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, mesh_calc_poly_normal_coords(mp, mloop + mp->loopstart, (const float (*)[3])coords, face_no); /* find the projector which the face points at most directly - * (projector normal with largest dot product is best) - */ + * (projector normal with largest dot product is best) + */ best_dot = dot_v3v3(projectors[0].normal, face_no); best_projector = &projectors[0]; |