diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_ocean.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_ocean.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 55d121737c1..726c37811fb 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -147,6 +147,7 @@ static void initData(ModifierData *md) omd->bakeend = 250; omd->oceancache = NULL; omd->foam_fade = 0.98; + omd->foamlayername[0] = '\0'; /* layer name empty by default */ omd->ocean = BKE_add_ocean(); init_ocean_modifier(omd); @@ -441,7 +442,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *UNUSED(ob), if(cdlayer >= MAX_MCOL) return dm; - CustomData_add_layer(&dm->faceData, CD_MCOL, CD_CALLOC, NULL, num_faces); + CustomData_add_layer_named(&dm->faceData, CD_MCOL, CD_CALLOC, NULL, num_faces, omd->foamlayername); mc = dm->getFaceDataArray(dm, CD_MCOL); mv = dm->getVertArray(dm); |