merge with/from trunk at r35190
[blender.git] / source / blender / modifiers / intern / MOD_particleinstance.c
index 100a22603d5960717628fb029067dfaf0efb1841..92c8b0893600a37edf6a0b591632f6b1ca4e699e 100644 (file)
 *
 */
 
+/** \file blender/modifiers/intern/MOD_particleinstance.c
+ *  \ingroup modifiers
+ */
+
+
 #include "DNA_meshdata_types.h"
 
 #include "MEM_guardedalloc.h"
 #include "BLI_math.h"
 #include "BLI_listbase.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_cdderivedmesh.h"
 #include "BKE_lattice.h"
 #include "BKE_modifier.h"
 #include "BKE_particle.h"
 #include "BKE_pointcache.h"
-#include "BKE_utildefines.h"
+
+#include "MOD_util.h"
 
 #include "depsgraph_private.h"
 
@@ -72,12 +79,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 +107,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;
@@ -310,10 +320,9 @@ static DerivedMesh * applyModifier(
 
        return dm;
 }
-
-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);
 }
@@ -331,6 +340,7 @@ ModifierTypeInfo modifierType_ParticleInstance = {
 
        /* copyData */          copyData,
        /* deformVerts */       0,
+       /* deformMatrices */    0,
        /* deformVertsEM */     0,
        /* deformMatricesEM */  0,
        /* applyModifier */     applyModifier,
@@ -341,6 +351,7 @@ ModifierTypeInfo modifierType_ParticleInstance = {
        /* isDisabled */        0,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
+       /* dependsOnNormals */  0,
        /* foreachObjectLink */ foreachObjectLink,
        /* foreachIDLink */     0,
 };