add UNUSED() to modifiers, also removed some unused args.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 14 Oct 2010 06:29:17 +0000 (06:29 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 14 Oct 2010 06:29:17 +0000 (06:29 +0000)
42 files changed:
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/intern/modifier.c
source/blender/editors/transform/transform_conversions.c
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/intern/MOD_armature.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_boolean.c
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_curve.c
source/blender/modifiers/intern/MOD_decimate.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_hook.c
source/blender/modifiers/intern/MOD_lattice.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_none.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_particlesystem.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_shapekey.c
source/blender/modifiers/intern/MOD_shrinkwrap.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_smoke.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_softbody.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_subsurf.c
source/blender/modifiers/intern/MOD_surface.c
source/blender/modifiers/intern/MOD_util.c
source/blender/modifiers/intern/MOD_util.h
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/render/intern/source/voxeldata.c

index 51120a61e69c70eb5af6eec0ec836d646fe01f3a..0225a402fb880b5c9d731fbc5df2cecd83f0409a 100644 (file)
@@ -315,7 +315,7 @@ int           modifiers_isParticleEnabled(struct Object *ob);
 struct Object *modifiers_isDeformedByArmature(struct Object *ob);
 struct Object *modifiers_isDeformedByLattice(struct Object *ob);
 int           modifiers_usesArmature(struct Object *ob, struct bArmature *arm);
-int           modifiers_isCorrectableDeformed(struct Scene *scene, struct Object *ob);
+int           modifiers_isCorrectableDeformed(struct Object *ob);
 void          modifier_freeTemporaryData(struct ModifierData *md);
 
 int           modifiers_indexInObject(struct Object *ob, struct ModifierData *md);
index d7c95a007e50ea7caab3f2def00ee38ed27bea8c..dc2992662c97f3b7bb420413c600667d2dcf4d02 100644 (file)
@@ -59,7 +59,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
        static int types_init = 1;
 
        if (types_init) {
-               modifier_type_init(types, type); /* MOD_utils.c */
+               modifier_type_init(types); /* MOD_utils.c */
                types_init= 0;
        }
 
@@ -492,7 +492,7 @@ int modifier_isCorrectableDeformed(ModifierData *md)
        return 0;
 }
 
-int modifiers_isCorrectableDeformed(struct Scene *scene, Object *ob)
+int modifiers_isCorrectableDeformed(Object *ob)
 {
        ModifierData *md = modifiers_getVirtualModifierList(ob);
        
index 0c0912a4ad62c83393ec8906f4e2ea8d250acf0f..fd97406652e1cef043ef7be404a7948145056f8e 100644 (file)
@@ -2145,7 +2145,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
        /* detect CrazySpace [tm] */
        if(propmode==0) {
                if(modifiers_getCageIndex(t->scene, t->obedit, NULL, 1)>=0) {
-                       if(modifiers_isCorrectableDeformed(t->scene, t->obedit)) {
+                       if(modifiers_isCorrectableDeformed(t->obedit)) {
                                /* check if we can use deform matrices for modifier from the
                                   start up to stack, they are more accurate than quats */
                                totleft= editmesh_get_first_deform_matrices(t->scene, t->obedit, em, &defmats, &defcos);
index a792b163eeaa84ff3dea95a8d9af1f43bd59fd6b..6063acf47f4a8fca6eddc0a40174c05a411b6b7b 100644 (file)
@@ -69,6 +69,6 @@ extern ModifierTypeInfo modifierType_Solidify;
 extern ModifierTypeInfo modifierType_Screw;
 
 /* MOD_util.c */
-void modifier_type_init(ModifierTypeInfo *types[], ModifierType type);
+void modifier_type_init(ModifierTypeInfo *types[]);
 
 #endif //MOD_MODIFIERTYPES_H
index 6d2a3e7098f64fa9bcf54ba84ec26fb803b87681..2f802ee67c8cec154e0854ec7e23b8375285f3fd 100644 (file)
@@ -35,6 +35,7 @@
 #include "DNA_armature_types.h"
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_lattice.h"
 #include "BKE_modifier.h"
@@ -63,7 +64,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(tamd->defgrp_name, amd->defgrp_name, 32);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))
 {
        CustomDataMask dataMask = 0;
 
@@ -73,7 +74,7 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
        return dataMask;
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        ArmatureModifierData *amd = (ArmatureModifierData*) md;
 
@@ -90,9 +91,10 @@ static void foreachObjectLink(
        walk(userData, ob, &amd->object);
 }
 
-static void updateDepgraph(
-                                               ModifierData *md, DagForest *forest, struct Scene *scene, Object *ob,
-        DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        ArmatureModifierData *amd = (ArmatureModifierData*) md;
 
@@ -104,9 +106,12 @@ static void updateDepgraph(
        }
 }
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-         float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        ArmatureModifierData *amd = (ArmatureModifierData*) md;
 
index 8331c3474b2317f63b887f79e34f90871c626e82..839bfef622671c6dda0e2466a68ba2f48099eeee 100644 (file)
@@ -101,8 +101,8 @@ static void foreachObjectLink(
        walk(userData, ob, &amd->offset_ob);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene,
-                                        Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+       struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode)
 {
        ArrayModifierData *amd = (ArrayModifierData*) md;
 
@@ -731,7 +731,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
 
 static DerivedMesh *applyModifier(
                ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+  int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
 {
        DerivedMesh *result;
        ArrayModifierData *amd = (ArrayModifierData*) md;
@@ -745,7 +745,7 @@ static DerivedMesh *applyModifier(
 }
 
 static DerivedMesh *applyModifierEM(
-               ModifierData *md, Object *ob, struct EditMesh *editData,
+               ModifierData *md, Object *ob, struct EditMesh *UNUSED(editData),
   DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
index 68274fbfd78b350982c686f949cf2f893413ff9c..937c8cd7eac0bb45b10f2f33c8eec12664765560 100644 (file)
@@ -66,7 +66,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(tbmd->defgrp_name, bmd->defgrp_name, 32);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        BevelModifierData *bmd = (BevelModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -77,9 +77,10 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
        return dataMask;
 }
 
-static DerivedMesh *applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *result;
        BME_Mesh *bm;
@@ -107,9 +108,9 @@ static DerivedMesh *applyModifier(
        return result;
 }
 
-static DerivedMesh *applyModifierEM(
-               ModifierData *md, Object *ob, EditMesh *editData,
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+                                               EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
 }
index 496523a310bfcc3027853e72914b71790cfc9bdf..dfcfd55f3d95339da41f1972e628f56ebb004ddd 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_modifier.h"
 
@@ -49,7 +50,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        tbmd->operation = bmd->operation;
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        BooleanModifierData *bmd = (BooleanModifierData*) md;
 
@@ -66,9 +67,10 @@ static void foreachObjectLink(
        walk(userData, ob, &bmd->object);
 }
 
-static void updateDepgraph(
-                                          ModifierData *md, DagForest *forest, struct Scene *scene, Object *ob,
-       DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        BooleanModifierData *bmd = (BooleanModifierData*) md;
 
@@ -81,9 +83,10 @@ static void updateDepgraph(
 }
 
 
-static DerivedMesh *applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        BooleanModifierData *bmd = (BooleanModifierData*) md;
        DerivedMesh *dm = bmd->object->derivedFinal;
@@ -105,7 +108,7 @@ static DerivedMesh *applyModifier(
        return derivedData;
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))
 {
        CustomDataMask dataMask = (1 << CD_MTFACE) + (1 << CD_MEDGE);
 
index de913d79f01e20b9195c7cebaf2d092d39c642c6..960db7fa9251e348abeeadbbff26636f5e1e6780 100644 (file)
@@ -65,14 +65,15 @@ static void copyData(ModifierData *md, ModifierData *target)
        tbmd->seed = bmd->seed;
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
 
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
-               DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm = derivedData;
        DerivedMesh *result;
index 1872263848bfc29d4d7e886e95fe16c0d294604b..c39aa288b180309004d7e272c26e1b40925a180c 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_deform.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_modifier.h"
@@ -73,7 +74,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(tcmd->defgrp_name, cmd->defgrp_name, 32);
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        CastModifierData *cmd = (CastModifierData*) md;
        short flag;
@@ -85,7 +86,7 @@ static int isDisabled(ModifierData *md, int useRenderParams)
        return 0;
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        CastModifierData *cmd = (CastModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -106,9 +107,10 @@ static void foreachObjectLink(
        walk (userData, ob, &cmd->object);
 }
 
-static void updateDepgraph(
-                                       ModifierData *md, DagForest *forest, struct Scene *scene, Object *ob,
-        DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        CastModifierData *cmd = (CastModifierData*) md;
 
@@ -566,14 +568,17 @@ static void cuboid_do(
        }
 }
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-        float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm = NULL;
        CastModifierData *cmd = (CastModifierData *)md;
 
-       dm = get_dm(md->scene, ob, NULL, derivedData, NULL, 0);
+       dm = get_dm(ob, NULL, derivedData, NULL, 0);
 
        if (cmd->type == MOD_CAST_TYPE_CUBOID) {
                cuboid_do(cmd, ob, dm, vertexCos, numVerts);
@@ -589,7 +594,7 @@ static void deformVertsEM(
                                           ModifierData *md, Object *ob, struct EditMesh *editData,
           DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
 {
-       DerivedMesh *dm = get_dm(md->scene, ob, editData, derivedData, NULL, 0);
+       DerivedMesh *dm = get_dm(ob, editData, derivedData, NULL, 0);
        CastModifierData *cmd = (CastModifierData *)md;
 
        if (cmd->type == MOD_CAST_TYPE_CUBOID) {
index 1c0ab34f15c77f4e770ffd7dc4047ef405a60099..0c6c1e87a722ddab5d0eb7932b55964215a2aa4d 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cloth.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_global.h"
@@ -111,7 +112,7 @@ static void updateDepgraph(
        }
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        CustomDataMask dataMask = 0;
        ClothModifierData *clmd = (ClothModifierData*)md;
@@ -150,7 +151,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        tclmd->clothObject = NULL;
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
index 2651122231cde5332bd4f4492b9b6975ef01bf97..20319b8c65fafc5239e59635fc7c5fe2ecc846f3 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_collision.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_global.h"
@@ -94,14 +95,17 @@ static void freeData(ModifierData *md)
        }
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
 
-static void deformVerts(
-                                         ModifierData *md, Object *ob, DerivedMesh *derivedData,
-          float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int UNUSED(numVerts),
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        CollisionModifierData *collmd = (CollisionModifierData*) md;
        DerivedMesh *dm = NULL;
index 998bf375e79c0981044d5b0d45d3d6789161ea32..8009ad0589c52277c26f83fde7e417062f53c22e 100644 (file)
@@ -35,6 +35,7 @@
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_lattice.h"
 #include "BKE_modifier.h"
@@ -59,7 +60,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(tcmd->name, cmd->name, 32);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        CurveModifierData *cmd = (CurveModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -70,7 +71,7 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
        return dataMask;
 }
 
-static int isDisabled(ModifierData *md, int userRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
 {
        CurveModifierData *cmd = (CurveModifierData*) md;
 
@@ -87,9 +88,10 @@ static void foreachObjectLink(
        walk(userData, ob, &cmd->object);
 }
 
-static void updateDepgraph(
-                                        ModifierData *md, DagForest *forest, Scene *scene,
-         Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        CurveModifierData *cmd = (CurveModifierData*) md;
 
@@ -101,9 +103,12 @@ static void updateDepgraph(
        }
 }
 
-static void deformVerts(
-                                         ModifierData *md, Object *ob, DerivedMesh *derivedData,
-         float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        CurveModifierData *cmd = (CurveModifierData*) md;
 
index 03307934e00616d9148166cf512fdcff3027b04c..8df0c0be3eb89a5b1ebef0c6dd5c02b117b01524 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_mesh.h"
 #include "BKE_modifier.h"
@@ -59,9 +60,10 @@ static void copyData(ModifierData *md, ModifierData *target)
        tdmd->percent = dmd->percent;
 }
 
-static DerivedMesh *applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DecimateModifierData *dmd = (DecimateModifierData*) md;
        DerivedMesh *dm = derivedData, *result = NULL;
index 2e811eb742df0fd9b3b01cd0627dbe3f352f6373..95e8a9ce4ccd3f4fae5a857fd2e2f5e68c5bc1a7 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_modifier.h"
 #include "BKE_texture.h"
@@ -75,7 +76,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(tdmd->uvlayer_name, dmd->uvlayer_name, 32);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        DisplaceModifierData *dmd = (DisplaceModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -127,16 +128,17 @@ static void foreachIDLink(ModifierData *md, Object *ob,
        foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData);
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        DisplaceModifierData *dmd = (DisplaceModifierData*) md;
 
        return (!dmd->texture || dmd->strength == 0.0f);
 }
 
-static void updateDepgraph(
-                                               ModifierData *md, DagForest *forest, struct Scene *scene,
-        Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        DisplaceModifierData *dmd = (DisplaceModifierData*) md;
 
@@ -308,11 +310,14 @@ static void displaceModifier_do(
        MEM_freeN(tex_co);
 }
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-         float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
-       DerivedMesh *dm= get_cddm(md->scene, ob, NULL, derivedData, vertexCos);
+       DerivedMesh *dm= get_cddm(ob, NULL, derivedData, vertexCos);
 
        displaceModifier_do((DisplaceModifierData *)md, ob, dm,
                                 vertexCos, numVerts);
@@ -325,7 +330,7 @@ static void deformVertsEM(
                                           ModifierData *md, Object *ob, struct EditMesh *editData,
        DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
 {
-       DerivedMesh *dm= get_cddm(md->scene, ob, editData, derivedData, vertexCos);
+       DerivedMesh *dm= get_cddm(ob, editData, derivedData, vertexCos);
 
        displaceModifier_do((DisplaceModifierData *)md, ob, dm,
                                 vertexCos, numVerts);
index e80b80abdb5e875f513f2c7477b0b8d129260d23..daf9d76cf51a661e42bc61e0ae02f2a7dd917ee6 100644 (file)
@@ -40,6 +40,7 @@
 #include "BLI_edgehash.h"
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_modifier.h"
 #include "BKE_particle.h"
@@ -730,8 +731,7 @@ static int edge_is_loose(SmoothEdge *edge)
        return !(edge->faces && edge->faces->next);
 }
 
-static int edge_is_sharp(SmoothEdge *edge, int flags,
-                        float threshold)
+static int edge_is_sharp(SmoothEdge *edge)
 {
 #ifdef EDGESPLIT_DEBUG_1
        printf("edge %d: ", edge->newIndex);
@@ -761,8 +761,7 @@ static int edge_is_sharp(SmoothEdge *edge, int flags,
  * - hits a sharp edge (the edge is returned)
  * - returns to the start edge (NULL is returned)
  */
-static SmoothEdge *find_other_sharp_edge(SmoothVert *vert, SmoothEdge *edge,
-                                        LinkNode **visited_faces, float threshold, int flags)
+static SmoothEdge *find_other_sharp_edge(SmoothVert *vert, SmoothEdge *edge, LinkNode **visited_faces)
 {
        SmoothFace *face = NULL;
        SmoothEdge *edge2 = NULL;
@@ -790,7 +789,7 @@ static SmoothEdge *find_other_sharp_edge(SmoothVert *vert, SmoothEdge *edge,
        /* search until we hit a loose edge or a sharp edge or an edge we've
        * seen before
        */
-       while(face && !edge_is_sharp(edge2, flags, threshold)
+       while(face && !edge_is_sharp(edge2)
                         && !linklist_contains(visited_edges, edge2)) {
 #ifdef EDGESPLIT_DEBUG_3
                printf("current face %4d; current edge %4d\n", face->newIndex,
@@ -902,8 +901,7 @@ static void propagate_split(SmoothEdge *edge, SmoothVert *vert,
                   edge->newIndex, vert->newIndex);
 #endif
 
-       edge2 = find_other_sharp_edge(vert, edge, &visited_faces,
-                                         mesh->threshold, mesh->flags);
+       edge2 = find_other_sharp_edge(vert, edge, &visited_faces);
 
        if(!edge2) {
                /* didn't find a sharp or loose edge, so we've hit a dead end */
@@ -912,7 +910,7 @@ static void propagate_split(SmoothEdge *edge, SmoothVert *vert,
                if(edge_is_loose(edge)) {
                        /* edge is loose, so we can split edge2 at this vert */
                        split_edge(edge2, vert, mesh);
-               } else if(edge_is_sharp(edge, mesh->flags, mesh->threshold)) {
+               } else if(edge_is_sharp(edge)) {
                        /* both edges are sharp, so we can split the pair at vert */
                        split_edge(edge, vert, mesh);
                } else {
@@ -961,8 +959,7 @@ static void split_edge(SmoothEdge *edge, SmoothVert *vert, SmoothMesh *mesh)
                   edge->newIndex, vert->newIndex);
 #endif
 
-       edge2 = find_other_sharp_edge(vert, edge, &visited_faces,
-                                         mesh->threshold, mesh->flags);
+       edge2 = find_other_sharp_edge(vert, edge, &visited_faces);
 
        if(!edge2) {
                /* didn't find a sharp or loose edge, so try the other vert */
@@ -1111,7 +1108,7 @@ static void split_sharp_edges(SmoothMesh *mesh, float split_angle, int flags)
        for(i = 0; i < mesh->num_edges; i++) {
                SmoothEdge *edge = &mesh->edges[i];
 
-               if(edge_is_sharp(edge, flags, mesh->threshold)) {
+               if(edge_is_sharp(edge)) {
                        split_edge(edge, edge->verts[0], mesh);
 
                        do {
@@ -1190,8 +1187,7 @@ static void split_bridge_verts(SmoothMesh *mesh)
        }
 }
 
-static DerivedMesh *edgesplitModifier_do(EdgeSplitModifierData *emd,
-                                        Object *ob, DerivedMesh *dm)
+static DerivedMesh *edgesplitModifier_do(EdgeSplitModifierData *emd, DerivedMesh *dm)
 {
        SmoothMesh *mesh;
        DerivedMesh *result;
@@ -1244,14 +1240,15 @@ static DerivedMesh *edgesplitModifier_do(EdgeSplitModifierData *emd,
        return result;
 }
 
-static DerivedMesh *applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *result;
        EdgeSplitModifierData *emd = (EdgeSplitModifierData*) md;
 
-       result = edgesplitModifier_do(emd, ob, derivedData);
+       result = edgesplitModifier_do(emd, derivedData);
 
        if(result != derivedData)
                CDDM_calc_normals(result);
@@ -1259,9 +1256,9 @@ static DerivedMesh *applyModifier(
        return result;
 }
 
-static DerivedMesh *applyModifierEM(
-               ModifierData *md, Object *ob, struct EditMesh *editData,
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
 }
index cbf5f3c3b98899c80356942a5576db831df9473b..67f1f2a3e5959c462e9128516068db6def085501 100644 (file)
@@ -74,11 +74,11 @@ static void copyData(ModifierData *md, ModifierData *target)
        temd->protect = emd->protect;
        temd->vgroup = emd->vgroup;
 }
-static int dependsOnTime(ModifierData *md
+static int dependsOnTime(ModifierData *UNUSED(md)
 {
        return 1;
 }
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        ExplodeModifierData *emd= (ExplodeModifierData*) md;
        CustomDataMask dataMask = 0;
@@ -90,8 +90,8 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
 }
 
 static void createFacepa(ExplodeModifierData *emd,
-                                        ParticleSystemModifierData *psmd,
-         Object *ob, DerivedMesh *dm)
+                                               ParticleSystemModifierData *psmd,
+                                               DerivedMesh *dm)
 {
        ParticleSystem *psys=psmd->psys;
        MFace *fa=0, *mface=0;
@@ -833,9 +833,10 @@ static ParticleSystemModifierData * findPrecedingParticlesystem(Object *ob, Modi
        }
        return psmd;
 }
-static DerivedMesh * applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm = derivedData;
        ExplodeModifierData *emd= (ExplodeModifierData*) md;
@@ -852,16 +853,16 @@ static DerivedMesh * applyModifier(
                if(emd->facepa==0
                                 || psmd->flag&eParticleSystemFlag_Pars
                                 || emd->flag&eExplodeFlag_CalcFaces
-                                || MEM_allocN_len(emd->facepa)/sizeof(int) != dm->getNumFaces(dm)){
+                                || MEM_allocN_len(emd->facepa)/sizeof(int) != dm->getNumFaces(dm))
+               {
                        if(psmd->flag & eParticleSystemFlag_Pars)
                                psmd->flag &= ~eParticleSystemFlag_Pars;
                        
                        if(emd->flag & eExplodeFlag_CalcFaces)
                                emd->flag &= ~eExplodeFlag_CalcFaces;
 
-                       createFacepa(emd,psmd,ob,derivedData);
-                                }
-
+                       createFacepa(emd,psmd,derivedData);
+               }
                                 /* 2. create new mesh */
                                 if(emd->flag & eExplodeFlag_EdgeSplit){
                                         int *facepa = emd->facepa;
index 619891e136f941f7e9949bf4e07078b3f6c9609d..14fb09f1c1fe5cb6646690eec4861c1043947db0 100644 (file)
@@ -34,6 +34,7 @@
 #include "DNA_object_fluidsim.h"
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_modifier.h"
 
@@ -125,7 +126,7 @@ static void updateDepgraph(
        }
 }
 
-static int dependsOnTime(ModifierData *md
+static int dependsOnTime(ModifierData *UNUSED(md)
 {
        return 1;
 }
index 0c5428cc9d8e7f66646f33f1dd54659cc75b0d13..42c2fc5bbe4fc4903a601f74e67865ff12224a78 100644 (file)
@@ -443,7 +443,7 @@ void fluidsim_read_vel_cache(FluidsimModifierData *fluidmd, DerivedMesh *dm, cha
        gzclose(gzf);
 }
 
-DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, FluidsimModifierData *fluidmd, int framenr, int useRenderParams)
+DerivedMesh *fluidsim_read_cache(DerivedMesh *orgdm, FluidsimModifierData *fluidmd, int framenr, int useRenderParams)
 {
        int displaymode = 0;
        int curFrame = framenr - 1 /*scene->r.sfra*/; /* start with 0 at start frame */
@@ -537,7 +537,11 @@ DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, FluidsimModifie
 
 #endif // DISABLE_ELBEEM
 
-DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene, Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc)
+DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene,
+                                               Object *UNUSED(ob),
+                                               DerivedMesh *dm,
+                                               int useRenderParams,
+                                               int UNUSED(isFinalCalc))
 {
 #ifndef DISABLE_ELBEEM
        DerivedMesh *result = NULL;
@@ -567,7 +571,7 @@ DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene, Ob
        }
        
        /* try to read from cache */
-       if(((fss->lastgoodframe >= framenr) || (fss->lastgoodframe < 0)) && (result = fluidsim_read_cache(ob, dm, fluidmd, framenr, useRenderParams)))
+       if(((fss->lastgoodframe >= framenr) || (fss->lastgoodframe < 0)) && (result = fluidsim_read_cache(dm, fluidmd, framenr, useRenderParams)))
        {
                // fss->lastgoodframe = framenr; // set also in src/fluidsim.c
                return result;
@@ -577,7 +581,7 @@ DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene, Ob
                // display last known good frame
                if(fss->lastgoodframe >= 0)
                {
-                       if((result = fluidsim_read_cache(ob, dm, fluidmd, fss->lastgoodframe, useRenderParams))) 
+                       if((result = fluidsim_read_cache(dm, fluidmd, fss->lastgoodframe, useRenderParams))) 
                        {
                                return result;
                        }
@@ -587,7 +591,7 @@ DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene, Ob
                        
                        
                        // this could be likely the case when you load an old fluidsim
-                       if((result = fluidsim_read_cache(ob, dm, fluidmd, fss->lastgoodframe, useRenderParams))) 
+                       if((result = fluidsim_read_cache(dm, fluidmd, fss->lastgoodframe, useRenderParams))) 
                        {
                                return result;
                        }
index f2ffd486aa5a1bd78fe090f25addabb581698ae5..8ad3c9aaf5b8218cc2b58b96df5c95e0d7bd733f 100644 (file)
@@ -40,6 +40,7 @@
 #include "BKE_cdderivedmesh.h"
 #include "BKE_modifier.h"
 #include "BKE_deform.h"
+#include "BKE_utildefines.h"
 
 #include "depsgraph_private.h"
 #include "MEM_guardedalloc.h"
@@ -68,7 +69,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(thmd->subtarget, hmd->subtarget, 32);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        HookModifierData *hmd = (HookModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -86,7 +87,7 @@ static void freeData(ModifierData *md)
        if (hmd->indexar) MEM_freeN(hmd->indexar);
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        HookModifierData *hmd = (HookModifierData*) md;
 
@@ -103,8 +104,10 @@ static void foreachObjectLink(
        walk(userData, ob, &hmd->object);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene,
-                                       Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        HookModifierData *hmd = (HookModifierData*) md;
 
@@ -118,9 +121,12 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *sc
        }
 }
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-        float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        HookModifierData *hmd = (HookModifierData*) md;
        bPoseChannel *pchan= get_pose_channel(hmd->object->pose, hmd->subtarget);
index 532475a34669098fd392899f4e57f56b47116565..fdbc3fa0a50232f28c8d45071443076760ec50f5 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_lattice.h"
 #include "BKE_modifier.h"
@@ -52,7 +53,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(tlmd->name, lmd->name, 32);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        LatticeModifierData *lmd = (LatticeModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -63,7 +64,7 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
        return dataMask;
 }
 
-static int isDisabled(ModifierData *md, int userRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
 {
        LatticeModifierData *lmd = (LatticeModifierData*) md;
 
@@ -80,8 +81,10 @@ static void foreachObjectLink(
        walk(userData, ob, &lmd->object);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene,
-                                          Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        LatticeModifierData *lmd = (LatticeModifierData*) md;
 
@@ -93,9 +96,12 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *sc
        }
 }
 
-static void deformVerts(
-                                       ModifierData *md, Object *ob, DerivedMesh *derivedData,
-        float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        LatticeModifierData *lmd = (LatticeModifierData*) md;
 
index c15653521331e4327bfa61ea4f368a17667ae76a..eddb21596a68abc78c96282e78b77458621ccd00 100644 (file)
@@ -55,7 +55,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strcpy(tmmd->vgroup, mmd->vgroup);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))
 {
        return (1 << CD_MDEFORMVERT);
 }
@@ -69,8 +69,10 @@ static void foreachObjectLink(
        walk(userData, ob, &mmd->ob_arm);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene,
-                                          Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        MaskModifierData *mmd = (MaskModifierData *)md;
 
@@ -84,8 +86,9 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *sc
 }
 
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
-               DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        MaskModifierData *mmd= (MaskModifierData *)md;
        DerivedMesh *dm= derivedData, *result= NULL;
index af87fb6ef7403a5e9b4b35cbc8eb94c58a5d3928..587b3b8f053416107ec685a2f291804a4f5c837e 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_global.h"
 #include "BKE_mesh.h"
@@ -76,7 +77,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        tmmd->object = mmd->object;
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {      
        MeshDeformModifierData *mmd = (MeshDeformModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -87,7 +88,7 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
        return dataMask;
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
 
@@ -104,9 +105,10 @@ static void foreachObjectLink(
        walk(userData, ob, &mmd->object);
 }
 
-static void updateDepgraph(
-                                                 ModifierData *md, DagForest *forest, struct Scene *scene, Object *ob,
-          DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
 
@@ -204,7 +206,7 @@ static void meshdeformModifier_do(
        /* if we don't have one computed, use derivedmesh from data
         * without any modifiers */
        if(!cagedm) {
-               cagedm= get_dm(md->scene, mmd->object, NULL, NULL, NULL, 0);
+               cagedm= get_dm(mmd->object, NULL, NULL, NULL, 0);
                if(cagedm)
                        cagedm->needsFree= 1;
        }
@@ -338,11 +340,14 @@ static void meshdeformModifier_do(
        cagedm->release(cagedm);
 }
 
-static void deformVerts(
-                                          ModifierData *md, Object *ob, DerivedMesh *derivedData,
-       float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
-       DerivedMesh *dm= get_dm(md->scene, ob, NULL, derivedData, NULL, 0);;
+       DerivedMesh *dm= get_dm(ob, NULL, derivedData, NULL, 0);;
 
        modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
        
@@ -352,11 +357,13 @@ static void deformVerts(
                dm->release(dm);
 }
 
-static void deformVertsEM(
-                                                ModifierData *md, Object *ob, struct EditMesh *editData,
-         DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+static void deformVertsEM(ModifierData *md, Object *ob,
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts)
 {
-       DerivedMesh *dm= get_dm(md->scene, ob, NULL, derivedData, NULL, 0);;
+       DerivedMesh *dm= get_dm(ob, NULL, derivedData, NULL, 0);;
 
        meshdeformModifier_do(md, ob, dm, vertexCos, numVerts);
 
index 9289c44c41436798009787f3992199fe945974d2..6405f0e9d762845c8f770cb0d7826df95b84bce6 100644 (file)
@@ -74,8 +74,10 @@ static void foreachObjectLink(
        walk(userData, ob, &mmd->mirror_ob);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene,
-                                         Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        MirrorModifierData *mmd = (MirrorModifierData*) md;
 
@@ -298,9 +300,10 @@ static DerivedMesh *mirrorModifier__doMirror(MirrorModifierData *mmd,
        return result;
 }
 
-static DerivedMesh *applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *result;
        MirrorModifierData *mmd = (MirrorModifierData*) md;
@@ -313,9 +316,9 @@ static DerivedMesh *applyModifier(
        return result;
 }
 
-static DerivedMesh *applyModifierEM(
-               ModifierData *md, Object *ob, struct EditMesh *editData,
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
 }
index 8cfb2a593766fe9dfa90c753cb92db6b3f654b5d..1b6a709e7f49fff7ef1196772fbe90e573d90eed 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include "BKE_utildefines.h"
 #include "MOD_modifiertypes.h"
 
 /* We only need to define isDisabled; because it always returns 1,
  * no other functions will be called
  */
 
-static int isDisabled(ModifierData *md, int userRenderParams)
+static int isDisabled(ModifierData *UNUSED(md), int UNUSED(userRenderParams))
 {
        return 1;
 }
index bbd0219d3f88ff40e1661a9dcd746d67ae5f44ba..9fcefdba49add76d3ece8937d6881b784da17d0c 100644 (file)
@@ -72,12 +72,14 @@ static void copyData(ModifierData *md, ModifierData *target)
        tpimd->random_position = pimd->random_position;
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 0;
 }
 static void updateDepgraph(ModifierData *md, DagForest *forest,
-                struct Scene *scene,Object *ob, DagNode *obNode)
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData*) md;
 
@@ -98,9 +100,10 @@ static void foreachObjectLink(ModifierData *md, Object *ob,
        walk(userData, ob, &pimd->ob);
 }
 
-static DerivedMesh * applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm = derivedData, *result;
        ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
@@ -306,9 +309,9 @@ static DerivedMesh * applyModifier(
 
        return result;
 }
-static DerivedMesh *applyModifierEM(
-               ModifierData *md, Object *ob, struct EditMesh *editData,
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
 }
index 602b6dd1d56699e32e03170a003c7a10eac6a626..0feea3b6bf55e3fdf8fb069c1e76b34d65d1f791 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "DNA_material_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_material.h"
 #include "BKE_modifier.h"
@@ -119,9 +120,12 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
 }
 
 /* saves the current emitter state for a particle system and calculates particles */
-static void deformVerts(
-                                                  ModifierData *md, Object *ob, DerivedMesh *derivedData,
-               float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int UNUSED(numVerts),
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm = derivedData;
        ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
@@ -137,7 +141,7 @@ static void deformVerts(
                return;
 
        if(dm==0) {
-               dm= get_dm(md->scene, ob, NULL, NULL, vertexCos, 1);
+               dm= get_dm(ob, NULL, NULL, vertexCos, 1);
 
                if(!dm)
                        return;
index 0016fd2d266ec5c1c3e3d48b17b7f6bd4d1b1e9d..668f0a086d10a3b1906ceb13f9db9b7c108658d9 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 
 #include "depsgraph_private.h"
@@ -128,8 +129,9 @@ static void copyData(ModifierData *md, ModifierData *target)
 }
 
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
-                                                                               DerivedMesh *derivedData,
-                                                                               int useRenderParams, int isFinalCalc)
+                                               DerivedMesh *derivedData,
+                                               int useRenderParams,
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm= derivedData;
        DerivedMesh *result;
@@ -832,9 +834,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
 }
 
 
-static void updateDepgraph(
-                                                                       ModifierData *md, DagForest *forest,
-                                                                       struct Scene *scene, Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        ScrewModifierData *ltmd= (ScrewModifierData*) md;
 
@@ -859,13 +862,15 @@ static void foreachObjectLink(
 
 /* This dosnt work with material*/
 static DerivedMesh *applyModifierEM(
-                                               ModifierData *md, Object *ob, struct EditMesh *editData,
+                                               ModifierData *md,
+                                               Object *ob,
+                                               struct EditMesh *UNUSED(editData),
                                                DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 0;
 }
index bf675b874f6295c0df30dddfd98f06a92cc5b044..3a3150022d83fc4a8077bfb8edcc11c112c9bb73 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "DNA_key_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_key.h"
 #include "BKE_particle.h"
 
 #include "MEM_guardedalloc.h"
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-         float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *UNUSED(derivedData),
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        KeyBlock *kb= ob_get_keyblock(ob);
        float (*deformedVerts)[3];
@@ -58,9 +62,11 @@ static void deformVerts(
        }
 }
 
-static void deformVertsEM(
-                                          ModifierData *md, Object *ob, struct EditMesh *editData,
-       DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+static void deformVertsEM(ModifierData *md, Object *ob,
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts)
 {
        Key *key= ob_get_key(ob);
 
@@ -68,10 +74,12 @@ static void deformVertsEM(
                deformVerts(md, ob, derivedData, vertexCos, numVerts, 0, 0);
 }
 
-static void deformMatricesEM(
-                                                 ModifierData *md, Object *ob, struct EditMesh *editData,
-          DerivedMesh *derivedData, float (*vertexCos)[3],
-                                                float (*defMats)[3][3], int numVerts)
+static void deformMatricesEM(ModifierData *UNUSED(md), Object *ob,
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *UNUSED(derivedData),
+                                               float UNUSED((*vertexCos)[3]),
+                                               float (*defMats)[3][3],
+                                               int numVerts)
 {
        Key *key= ob_get_key(ob);
        KeyBlock *kb= ob_get_keyblock(ob);
index 6baee9f0d98428a9370580b98d07e81a9329894d..6eebe9b5e5e79e88e3a2954df1b436e2a9ea38cb 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <string.h>
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_modifier.h"
 #include "BKE_shrinkwrap.h"
@@ -71,7 +72,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        tsmd->subsurfLevels = smd->subsurfLevels;
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -87,7 +88,7 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
        return dataMask;
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*) md;
        return !smd->target;
@@ -102,14 +103,19 @@ static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk,
        walk(userData, ob, &smd->auxTarget);
 }
 
-static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm = derivedData;
        CustomDataMask dataMask = requiredDataMask(ob, md);
 
        /* ensure we get a CDDM with applied vertex coords */
        if(dataMask)
-               dm= get_cddm(md->scene, ob, NULL, dm, vertexCos);
+               dm= get_cddm(ob, NULL, dm, vertexCos);
 
        shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, md->scene, ob, dm, vertexCos, numVerts);
 
@@ -124,7 +130,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, struct EditMesh *editDat
 
        /* ensure we get a CDDM with applied vertex coords */
        if(dataMask)
-               dm= get_cddm(md->scene, ob, editData, dm, vertexCos);
+               dm= get_cddm(ob, editData, dm, vertexCos);
 
        shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, md->scene, ob, dm, vertexCos, numVerts);
 
@@ -132,7 +138,10 @@ static void deformVertsEM(ModifierData *md, Object *ob, struct EditMesh *editDat
                dm->release(dm);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene, Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*) md;
 
index ab5807813511951b71cf30a33d5118dbbf6be56e..7c47ab021570c82486a8f6933b9897b5896e2bd1 100644 (file)
@@ -290,7 +290,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strcpy(tsmd->vgroup_name, smd->vgroup_name);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -308,7 +308,10 @@ static void foreachObjectLink(ModifierData *md, Object *ob, void (*walk)(void *u
        walk(userData, ob, &smd->origin);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene, Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        SimpleDeformModifierData *smd  = (SimpleDeformModifierData*)md;
 
@@ -316,7 +319,12 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *sc
                dag_add_relation(forest, dag_get_node(forest, smd->origin), obNode, DAG_RL_OB_DATA, "SimpleDeform Modifier");
 }
 
-static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm = derivedData;
        CustomDataMask dataMask = requiredDataMask(ob, md);
@@ -324,7 +332,7 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
        /* we implement requiredDataMask but thats not really usefull since
           mesh_calc_modifiers pass a NULL derivedData */
        if(dataMask)
-               dm= get_dm(md->scene, ob, NULL, dm, NULL, 0);
+               dm= get_dm(ob, NULL, dm, NULL, 0);
 
        SimpleDeformModifier_do((SimpleDeformModifierData*)md, ob, dm, vertexCos, numVerts);
 
@@ -332,7 +340,11 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
                dm->release(dm);
 }
 
-static void deformVertsEM(ModifierData *md, Object *ob, struct EditMesh *editData, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
+static void deformVertsEM(ModifierData *md, Object *ob,
+                                               struct EditMesh *editData,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts)
 {
        DerivedMesh *dm = derivedData;
        CustomDataMask dataMask = requiredDataMask(ob, md);
@@ -340,7 +352,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, struct EditMesh *editDat
        /* we implement requiredDataMask but thats not really usefull since
           mesh_calc_modifiers pass a NULL derivedData */
        if(dataMask)
-               dm= get_dm(md->scene, ob, editData, dm, NULL, 0);
+               dm= get_dm(ob, editData, dm, NULL, 0);
 
        SimpleDeformModifier_do((SimpleDeformModifierData*)md, ob, dm, vertexCos, numVerts);
 
index f89ff0bb1b5902e269639c3e6c9e189082a1a0ba..aee466802ca88008f53d28ec07a3ff679dfbd4e3 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_modifier.h"
 #include "BKE_smoke.h"
@@ -71,12 +72,15 @@ static void freeData(ModifierData *md)
        smokeModifier_free (smd);
 }
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-         float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int UNUSED(numVerts),
+                                               int useRenderParams,
+                                               int isFinalCalc)
 {
        SmokeModifierData *smd = (SmokeModifierData*) md;
-       DerivedMesh *dm = dm= get_cddm(md->scene, ob, NULL, derivedData, vertexCos);
+       DerivedMesh *dm = dm= get_cddm(ob, NULL, derivedData, vertexCos);
 
        smokeModifier_do(smd, md->scene, ob, dm, useRenderParams, isFinalCalc);
 
@@ -84,14 +88,15 @@ static void deformVerts(
                dm->release(dm);
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
 
-static void updateDepgraph(
-                                        ModifierData *md, DagForest *forest, struct Scene *scene, Object *ob,
-         DagNode *obNode)
+static void updateDepgraph(ModifierData *UNUSED(md), DagForest *UNUSED(forest),
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *UNUSED(obNode))
 {
        /*SmokeModifierData *smd = (SmokeModifierData *) md;
        if(smd && (smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
index 96269c092c951e27ef65caa2a17cbb1449d273ab..db7013f53ce8a2eb0a2311d090300d22825ffb5c 100644 (file)
@@ -37,6 +37,7 @@
 #include "BKE_cdderivedmesh.h"
 #include "BKE_particle.h"
 #include "BKE_deform.h"
+#include "BKE_utildefines.h"
 
 #include "MEM_guardedalloc.h"
 
@@ -65,7 +66,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(tsmd->defgrp_name, smd->defgrp_name, 32);
 }
 
-static int isDisabled(ModifierData *md, int useRenderParams)
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 {
        SmoothModifierData *smd = (SmoothModifierData*) md;
        short flag;
@@ -78,7 +79,7 @@ static int isDisabled(ModifierData *md, int useRenderParams)
        return 0;
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        SmoothModifierData *smd = (SmoothModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -219,9 +220,9 @@ static void smoothModifier_do(
 
 static void deformVerts(
                                           ModifierData *md, Object *ob, DerivedMesh *derivedData,
-          float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+          float (*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
 {
-       DerivedMesh *dm= get_dm(md->scene, ob, NULL, derivedData, NULL, 0);
+       DerivedMesh *dm= get_dm(ob, NULL, derivedData, NULL, 0);
 
        smoothModifier_do((SmoothModifierData *)md, ob, dm,
                           vertexCos, numVerts);
@@ -234,7 +235,7 @@ static void deformVertsEM(
                                         ModifierData *md, Object *ob, struct EditMesh *editData,
          DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
 {
-       DerivedMesh *dm= get_dm(md->scene, ob, editData, derivedData, NULL, 0);
+       DerivedMesh *dm= get_dm(ob, editData, derivedData, NULL, 0);
 
        smoothModifier_do((SmoothModifierData *)md, ob, dm,
                           vertexCos, numVerts);
index 931cfe2e2d3e794c22e09f724a86fcc730e5286d..8d962395d016667edd8d10acc23a60d785f5bde7 100644 (file)
 
 #include "DNA_scene_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_particle.h"
 #include "BKE_softbody.h"
 
 #include "MOD_modifiertypes.h"
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-         float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *UNUSED(derivedData),
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        sbObjectStep(md->scene, ob, (float)md->scene->r.cfra, vertexCos, numVerts);
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
index 57155c4e1dc4ac2b619012f4696bb7c77ba068de..6abe1262c0bd1891b813240a7fcf731f6aeeb857 100644 (file)
@@ -179,7 +179,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strcpy(tsmd->defgrp_name, smd->defgrp_name);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        SolidifyModifierData *smd = (SolidifyModifierData*) md;
        CustomDataMask dataMask = 0;
@@ -191,11 +191,10 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
 }
 
 
-static DerivedMesh *applyModifier(ModifierData *md,
-                                                  Object *ob, 
-                                                  DerivedMesh *dm,
-                                                  int useRenderParams,
-                                                  int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob, 
+                                               DerivedMesh *dm,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        int i;
        DerivedMesh *result;
@@ -630,7 +629,7 @@ static DerivedMesh *applyModifier(ModifierData *md,
 
 static DerivedMesh *applyModifierEM(ModifierData *md,
                                                         Object *ob,
-                                                        struct EditMesh *editData,
+                                                        struct EditMesh *UNUSED(editData),
                                                         DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
index cd3657b967472141addc1432c928b15b6d2ba8f6..3264717c97a42ace4e8b4dc4be4a0d898c3f70e2 100644 (file)
@@ -35,6 +35,7 @@
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_scene.h"
 #include "BKE_subsurf.h"
@@ -83,9 +84,10 @@ static int isDisabled(ModifierData *md, int useRenderParams)
        return get_render_subsurf_level(&md->scene->r, levels) == 0;
 }
 
-static DerivedMesh *applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
+                                               DerivedMesh *derivedData,
+                                               int useRenderParams,
+                                               int isFinalCalc)
 {
        SubsurfModifierData *smd = (SubsurfModifierData*) md;
        DerivedMesh *result;
@@ -102,9 +104,9 @@ static DerivedMesh *applyModifier(
        return result;
 }
 
-static DerivedMesh *applyModifierEM(
-               ModifierData *md, Object *ob, struct EditMesh *editData,
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *UNUSED(ob),
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData)
 {
        SubsurfModifierData *smd = (SubsurfModifierData*) md;
        DerivedMesh *result;
index b2f55bde360889dddc2aef0165e803b384cb53cc..a1593df0ffa378196e372832143f96beaef3fc1b 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "BLI_math.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_cdderivedmesh.h"
 
 #include "MOD_modifiertypes.h"
@@ -76,14 +77,17 @@ static void freeData(ModifierData *md)
        }
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
 
-static void deformVerts(
-                                         ModifierData *md, Object *ob, DerivedMesh *derivedData,
-               float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int UNUSED(numVerts),
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        SurfaceModifierData *surmd = (SurfaceModifierData*) md;
        unsigned int numverts = 0, i = 0;
@@ -93,7 +97,7 @@ static void deformVerts(
 
        /* if possible use/create DerivedMesh */
        if(derivedData) surmd->dm = CDDM_copy(derivedData);
-       else surmd->dm = get_dm(md->scene, ob, NULL, NULL, NULL, 0);
+       else surmd->dm = get_dm(ob, NULL, NULL, NULL, 0);
        
        if(!ob->pd)
        {
index 754b18bc282d725c54c359b7a7542986b57d62e2..de96684a2dd6aa681cb775e149c21cbe26a54528 100644 (file)
@@ -84,13 +84,13 @@ void validate_layer_name(const CustomData *data, int type, char *name, char *out
 
        /* if a layer name was given, try to find that layer */
        if(name[0])
-               index = CustomData_get_named_layer_index(data, CD_MTFACE, name);
+               index = CustomData_get_named_layer_index(data, type, name);
 
        if(index < 0) {
                /* either no layer was specified, or the layer we want has been
                * deleted, so assign the active layer to name
                */
-               index = CustomData_get_active_layer_index(data, CD_MTFACE);
+               index = CustomData_get_active_layer_index(data, type);
                strcpy(outname, data->layers[index].name);
        }
        else
@@ -98,13 +98,13 @@ void validate_layer_name(const CustomData *data, int type, char *name, char *out
 }
 
 /* returns a cdderivedmesh if dm == NULL or is another type of derivedmesh */
-DerivedMesh *get_cddm(struct Scene *scene, Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3])
+DerivedMesh *get_cddm(Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3])
 {
        if(dm && dm->type == DM_TYPE_CDDM)
                return dm;
 
        if(!dm) {
-               dm= get_dm(scene, ob, em, dm, vertexCos, 0);
+               dm= get_dm(ob, em, dm, vertexCos, 0);
        }
        else {
                dm= CDDM_copy(dm);
@@ -118,7 +118,7 @@ DerivedMesh *get_cddm(struct Scene *scene, Object *ob, struct EditMesh *em, Deri
 }
 
 /* returns a derived mesh if dm == NULL, for deforming modifiers that need it */
-DerivedMesh *get_dm(struct Scene *scene, Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3], int orco)
+DerivedMesh *get_dm(Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3], int orco)
 {
        if(dm)
                return dm;
@@ -143,7 +143,7 @@ DerivedMesh *get_dm(struct Scene *scene, Object *ob, struct EditMesh *em, Derive
 }
 
 /* only called by BKE_modifier.h/modifier.c */
-void modifier_type_init(ModifierTypeInfo *types[], ModifierType type)
+void modifier_type_init(ModifierTypeInfo *types[])
 {
        memset(types, 0, sizeof(types));
 #define INIT_TYPE(typeName) (types[eModifierType_##typeName] = &modifierType_##typeName)
index 5750e042199df3f4f1e3d10ab1727f642709c97d..6abc29417b594f007ddafe8eeb15250b1c081078 100644 (file)
@@ -40,9 +40,9 @@ struct ModifierData;
 void get_texture_value(struct Tex *texture, float *tex_co, struct TexResult *texres);
 void modifier_vgroup_cache(struct ModifierData *md, float (*vertexCos)[3]);
 void validate_layer_name(const struct CustomData *data, int type, char *name, char *outname);
-struct DerivedMesh *get_cddm(struct Scene *scene, struct Object *ob, struct EditMesh *em, struct DerivedMesh *dm, float (*vertexCos)[3]);
-struct DerivedMesh *get_dm(struct Scene *scene, struct Object *ob, struct EditMesh *em, struct DerivedMesh *dm, float (*vertexCos)[3], int orco);
+struct DerivedMesh *get_cddm(struct Object *ob, struct EditMesh *em, struct DerivedMesh *dm, float (*vertexCos)[3]);
+struct DerivedMesh *get_dm(struct Object *ob, struct EditMesh *em, struct DerivedMesh *dm, float (*vertexCos)[3], int orco);
 
-void modifier_type_init(struct ModifierTypeInfo *types[], ModifierType type);
+void modifier_type_init(struct ModifierTypeInfo *types[]);
 
 #endif /* MOD_UTIL_H */
index 211640ad77796c84d7fffe9cfd4ba8520a30130a..942b4b0b59747c1b0900c9a1be180fe8dee294f4 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_math.h"
 #include "BLI_uvproject.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_DerivedMesh.h"
 
 #include "MOD_modifiertypes.h"
@@ -78,7 +79,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        tumd->scaley = umd->scaley;
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))
 {
        CustomDataMask dataMask = 0;
 
@@ -109,8 +110,10 @@ static void foreachIDLink(ModifierData *md, Object *ob,
                                                userData);
 }
 
-static void updateDepgraph(ModifierData *md,
-                                                DagForest *forest, struct Scene *scene, Object *ob, DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               struct Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        UVProjectModifierData *umd = (UVProjectModifierData*) md;
        int i;
@@ -376,9 +379,10 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
        return dm;
 }
 
-static DerivedMesh *applyModifier(
-               ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int useRenderParams, int isFinalCalc)
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *result;
        UVProjectModifierData *umd = (UVProjectModifierData*) md;
@@ -388,9 +392,9 @@ static DerivedMesh *applyModifier(
        return result;
 }
 
-static DerivedMesh *applyModifierEM(
-               ModifierData *md, Object *ob, struct EditMesh *editData,
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+                                               struct EditMesh *UNUSED(editData),
+                                               DerivedMesh *derivedData)
 {
        return applyModifier(md, ob, derivedData, 0, 1);
 }
index 42cbddce2334a45c276383921050871f6a276fa3..acd8c29a6ddf0cabba05219d50e45d54485decd2 100644 (file)
@@ -36,6 +36,7 @@
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_object.h"
 #include "BKE_deform.h"
@@ -93,7 +94,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        strncpy(twmd->defgrp_name, wmd->defgrp_name, 32);
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
@@ -118,9 +119,10 @@ static void foreachIDLink(ModifierData *md, Object *ob,
        foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData);
 }
 
-static void updateDepgraph(
-                                       ModifierData *md, DagForest *forest, Scene *scene, Object *ob,
-        DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+                                               Scene *UNUSED(scene),
+                                               Object *UNUSED(ob),
+                                               DagNode *obNode)
 {
        WaveModifierData *wmd = (WaveModifierData*) md;
 
@@ -139,7 +141,7 @@ static void updateDepgraph(
        }
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        WaveModifierData *wmd = (WaveModifierData *)md;
        CustomDataMask dataMask = 0;
@@ -399,17 +401,20 @@ static void waveModifier_do(WaveModifierData *md,
        if(wmd->texture) MEM_freeN(tex_co);
 }
 
-static void deformVerts(
-                                        ModifierData *md, Object *ob, DerivedMesh *derivedData,
-        float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
+static void deformVerts(ModifierData *md, Object *ob,
+                                               DerivedMesh *derivedData,
+                                               float (*vertexCos)[3],
+                                               int numVerts,
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DerivedMesh *dm= derivedData;
        WaveModifierData *wmd = (WaveModifierData *)md;
 
        if(wmd->flag & MOD_WAVE_NORM)
-               dm= get_cddm(md->scene, ob, NULL, dm, vertexCos);
+               dm= get_cddm(ob, NULL, dm, vertexCos);
        else if(wmd->texture || wmd->defgrp_name[0])
-               dm= get_dm(md->scene, ob, NULL, dm, NULL, 0);
+               dm= get_dm(ob, NULL, dm, NULL, 0);
 
        waveModifier_do(wmd, md->scene, ob, dm, vertexCos, numVerts);
 
@@ -425,9 +430,9 @@ static void deformVertsEM(
        WaveModifierData *wmd = (WaveModifierData *)md;
 
        if(wmd->flag & MOD_WAVE_NORM)
-               dm= get_cddm(md->scene, ob, editData, dm, vertexCos);
+               dm= get_cddm(ob, editData, dm, vertexCos);
        else if(wmd->texture || wmd->defgrp_name[0])
-               dm= get_dm(md->scene, ob, editData, dm, NULL, 0);
+               dm= get_dm(ob, editData, dm, NULL, 0);
 
        waveModifier_do(wmd, md->scene, ob, dm, vertexCos, numVerts);
 
index 076d63555851283a5c00e3f4bc923d90dd127fa7..0a2ea54c5b0b78a01d601dca19f9ff4fb352b068 100644 (file)
@@ -178,7 +178,7 @@ static int read_voxeldata_header(FILE *fp, struct VoxelData *vd)
        return 1;
 }
 
-static void init_frame_smoke(VoxelData *vd, Tex *tex)
+static void init_frame_smoke(VoxelData *vd)
 {
        Object *ob;
        ModifierData *md;
@@ -282,7 +282,7 @@ static void cache_voxeldata(struct Render *re,Tex *tex)
                        load_frame_image_sequence(vd, tex);
                        return;
                case TEX_VD_SMOKE:
-                       init_frame_smoke(vd, tex);
+                       init_frame_smoke(vd);
                        return;
                case TEX_VD_BLENDERVOXEL:
                        if (!BLI_exists(vd->source_path)) return;