diff options
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 39 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_displace.c | 3 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_edgesplit.c | 3 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_explode.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_mask.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_mirror.c | 35 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_ngoninterp.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvg_util.c | 4 |
9 files changed, 49 insertions, 40 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index e8979066d0b..ab25983bedf 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -28,13 +28,18 @@ * */ +/** \file blender/modifiers/intern/MOD_array.c + * \ingroup modifiers + */ + + /* Array modifier: duplicates the object multiple times along an axis */ #include "MEM_guardedalloc.h" +#include "BLI_math.h" #include "BLI_utildefines.h" #include "BLI_string.h" -#include "BLI_math.h" #include "BLI_ghash.h" #include "BLI_edgehash.h" @@ -106,8 +111,8 @@ static void foreachObjectLink( walk(userData, ob, &amd->offset_ob); } -static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), - Object *UNUSED(ob), DagNode *obNode) +static void updateDepgraph(ModifierData *md, DagForest *forest, + struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) { ArrayModifierData *amd = (ArrayModifierData*) md; @@ -365,10 +370,10 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, if(cu) { float tmp_mat[3][3]; float scale; - + object_to_mat3(amd->curve_ob, tmp_mat); scale = mat3_to_scale(tmp_mat); - + if(!cu->path) { cu->flag |= CU_PATH; // needed for path & bevlist makeDispListCurveTypes(scene, amd->curve_ob, 0); @@ -381,9 +386,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, /* calculate the maximum number of copies which will fit within the prescribed length */ if(amd->fit_type == MOD_ARR_FITLENGTH - || amd->fit_type == MOD_ARR_FITCURVE) - { - float dist = sqrtf(dot_v3v3(offset[3], offset[3])); + || 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 @@ -506,26 +510,27 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, return cddm; } -static DerivedMesh *applyModifier( - ModifierData *md, Object *ob, DerivedMesh *derivedData, - int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) +static DerivedMesh *applyModifier(ModifierData *md, Object *ob, + DerivedMesh *dm, + int UNUSED(useRenderParams), + int UNUSED(isFinalCalc)) { DerivedMesh *result; ArrayModifierData *amd = (ArrayModifierData*) md; - result = arrayModifier_doArray(amd, md->scene, ob, derivedData, 0); + result = arrayModifier_doArray(amd, md->scene, ob, dm, 0); - //if(result != derivedData) + //if(result != dm) // CDDM_calc_normals(result); return result; } -static DerivedMesh *applyModifierEM( - ModifierData *md, Object *ob, struct BMEditMesh *UNUSED(editData), - DerivedMesh *derivedData) +static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, + struct BMEditMesh *UNUSED(editData), + DerivedMesh *dm) { - return applyModifier(md, ob, derivedData, 0, 1); + return applyModifier(md, ob, dm, 0, 1); } diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 7a23dd45dd6..38a0e2baa34 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -188,8 +188,7 @@ static void displaceModifier_do( tex_co = MEM_callocN(sizeof(*tex_co) * numVerts, "displaceModifier_do tex_co"); get_texture_coords((MappingInfoModifierData *)dmd, ob, dm, vertexCos, tex_co, numVerts); - - + for(i = 0; i < numVerts; ++i) { TexResult texres; float delta = 0, strength = dmd->strength; diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index e9d99d377ba..7acdcd8a5fe 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -159,7 +159,8 @@ static DerivedMesh *applyModifier( } static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, - BMEditMesh *UNUSED(editData), DerivedMesh *derivedData) + struct BMEditMesh *UNUSED(editData), + DerivedMesh *derivedData) { return applyModifier(md, ob, derivedData, 0, 1); } diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index d5260802c7b..cc017738bd0 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -36,11 +36,11 @@ #include "DNA_meshdata_types.h" #include "DNA_scene_types.h" -#include "BLI_utildefines.h" #include "BLI_kdtree.h" #include "BLI_rand.h" #include "BLI_math.h" #include "BLI_edgehash.h" +#include "BLI_utildefines.h" #include "BKE_cdderivedmesh.h" #include "BKE_deform.h" diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index cdb92ab432c..9181ea155f3 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -384,7 +384,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, BLI_ghash_free(faceHash, NULL, NULL); /* return the new mesh */ - return result; } diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index af1efd18ab9..edf792deb89 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -28,13 +28,15 @@ * */ +/** \file blender/modifiers/intern/MOD_mirror.c + * \ingroup modifiers + */ + + #include "DNA_meshdata_types.h" #include "DNA_object_types.h" -#include "MEM_guardedalloc.h" - #include "BLI_math.h" -#include "BLI_smallhash.h" #include "BLI_array.h" #include "BKE_cdderivedmesh.h" @@ -44,6 +46,7 @@ #include "BKE_utildefines.h" #include "BKE_tessmesh.h" +#include "MEM_guardedalloc.h" #include "depsgraph_private.h" /*from MOD_array.c*/ @@ -74,13 +77,14 @@ static void foreachObjectLink( void *userData) { MirrorModifierData *mmd = (MirrorModifierData*) md; - - if (mmd->mirror_ob) - walk(userData, ob, &mmd->mirror_ob); + + walk(userData, ob, &mmd->mirror_ob); } -static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), - Object *UNUSED(ob), DagNode *obNode) +static void updateDepgraph(ModifierData *md, DagForest *forest, + struct Scene *UNUSED(scene), + Object *UNUSED(ob), + DagNode *obNode) { MirrorModifierData *mmd = (MirrorModifierData*) md; @@ -96,7 +100,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UN /* Mirror */ #define VERT_NEW 1 -DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, +static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, Object *ob, DerivedMesh *dm, int UNUSED(initFlags), @@ -288,9 +292,10 @@ static DerivedMesh *mirrorModifier__doMirror(MirrorModifierData *mmd, return result; } -static DerivedMesh *applyModifier( - ModifierData *md, Object *ob, DerivedMesh *derivedData, - int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) +static DerivedMesh *applyModifier(ModifierData *md, Object *ob, + DerivedMesh *derivedData, + int UNUSED(useRenderParams), + int UNUSED(isFinalCalc)) { DerivedMesh *result; MirrorModifierData *mmd = (MirrorModifierData*) md; @@ -303,9 +308,9 @@ static DerivedMesh *applyModifier( return result; } -static DerivedMesh *applyModifierEM( - ModifierData *md, Object *ob, struct BMEditMesh *UNUSED(editData), - DerivedMesh *derivedData) +static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, + struct BMEditMesh *UNUSED(editData), + DerivedMesh *derivedData) { return applyModifier(md, ob, derivedData, 0, 1); } diff --git a/source/blender/modifiers/intern/MOD_ngoninterp.c b/source/blender/modifiers/intern/MOD_ngoninterp.c index 7577f706f05..c363a7cfafd 100644 --- a/source/blender/modifiers/intern/MOD_ngoninterp.c +++ b/source/blender/modifiers/intern/MOD_ngoninterp.c @@ -39,7 +39,6 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BLI_array.h" -#include "BLI_smallhash.h" #include "BLI_edgehash.h" #include "BLI_math.h" diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 5fa49e234e7..9be38d64cd9 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -41,7 +41,6 @@ #include "BLI_math.h" #include "BLI_edgehash.h" #include "BLI_array.h" -#include "BLI_smallhash.h" #include "BLI_string.h" #include "BKE_cdderivedmesh.h" diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index adfdaf073d6..5631b7e716a 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -32,7 +32,6 @@ #include "BLI_rand.h" #include "BLI_string.h" #include "BLI_utildefines.h" -#include "BLI_cellalloc.h" #include "DNA_color_types.h" /* CurveMapping. */ #include "DNA_mesh_types.h" @@ -223,6 +222,9 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne } } + + + /* Applies weights to given vgroup (defgroup), and optionnaly add/remove vertices from the group. * If dws is not NULL, it must be an array of MDeformWeight pointers of same length as weights (and * defgrp_idx can then have any value). |