[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47510] branches/soc-2012-fried_chicken/ source/blender/modifiers/intern/MOD_smoke.c: Fix: Smoke flow vertex group didn't work with subdivision modifier.
Miika Hamalainen
miika.hamalainen at kolumbus.fi
Wed Jun 6 13:47:10 CEST 2012
Revision: 47510
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47510
Author: miikah
Date: 2012-06-06 11:47:07 +0000 (Wed, 06 Jun 2012)
Log Message:
-----------
Fix: Smoke flow vertex group didn't work with subdivision modifier.
Modified Paths:
--------------
branches/soc-2012-fried_chicken/source/blender/modifiers/intern/MOD_smoke.c
Modified: branches/soc-2012-fried_chicken/source/blender/modifiers/intern/MOD_smoke.c
===================================================================
--- branches/soc-2012-fried_chicken/source/blender/modifiers/intern/MOD_smoke.c 2012-06-06 11:40:01 UTC (rev 47509)
+++ branches/soc-2012-fried_chicken/source/blender/modifiers/intern/MOD_smoke.c 2012-06-06 11:47:07 UTC (rev 47510)
@@ -81,6 +81,19 @@
smokeModifier_free(smd);
}
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
+{
+ SmokeModifierData *smd = (SmokeModifierData *)md;
+ CustomDataMask dataMask = 0;
+
+ if (smd && (smd->type & MOD_SMOKE_TYPE_FLOW) && smd->flow) {
+ if (smd->flow->source == MOD_SMOKE_FLOW_SOURCE_MESH && smd->flow->vgroup_density) {
+ dataMask |= (1 << CD_MDEFORMVERT);
+ }
+ }
+ return dataMask;
+}
+
static void deformVerts(ModifierData *md, Object *ob,
DerivedMesh *derivedData,
float (*vertexCos)[3],
@@ -186,7 +199,7 @@
/* applyModifier */ NULL,
/* applyModifierEM */ NULL,
/* initData */ initData,
- /* requiredDataMask */ NULL,
+ /* requiredDataMask */ requiredDataMask,
/* freeData */ freeData,
/* isDisabled */ NULL,
/* updateDepgraph */ updateDepgraph,
More information about the Bf-blender-cvs
mailing list