Commit: 3485e70282bfa4bf386bc132b103b1b3f79f645b
Author: Lukas Tönne
Date:   Wed Aug 13 19:54:15 2014 +0200
Branches: hair_system
https://developer.blender.org/rB3485e70282bfa4bf386bc132b103b1b3f79f645b

Made the hair modifier into a nominal "deform only" modifier, to get
cycles to recognize it as a motion blur source.

===================================================================

M       source/blender/modifiers/intern/MOD_hair.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_hair.c 
b/source/blender/modifiers/intern/MOD_hair.c
index 94a670b0..574bfff 100644
--- a/source/blender/modifiers/intern/MOD_hair.c
+++ b/source/blender/modifiers/intern/MOD_hair.c
@@ -80,11 +80,13 @@ static void copyData(ModifierData *md, ModifierData *target)
        thmd->debug_data = NULL;
 }
 
-static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
-                                  DerivedMesh *dm,
-                                  ModifierApplyFlag UNUSED(flag))
+static void deformVerts(ModifierData *UNUSED(md), Object *UNUSED(ob),
+                        DerivedMesh *UNUSED(dm),
+                        float (*vertexCos)[3], int UNUSED(numVerts),
+                        ModifierApplyFlag UNUSED(flag))
 {
-       return dm;
+       (void)vertexCos;
+       return;
 }
 
 static void updateDepgraph(
@@ -104,17 +106,17 @@ ModifierTypeInfo modifierType_Hair = {
        /* name */              "Hair",
        /* structName */        "HairModifierData",
        /* structSize */        sizeof(HairModifierData),
-       /* type */              eModifierTypeType_Nonconstructive,
+       /* type */              eModifierTypeType_OnlyDeform,
 
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_Single,
 
        /* copyData */          copyData,
-       /* deformVerts */       NULL,
+       /* deformVerts */       deformVerts,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  NULL,

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to