Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-04-08 23:50:00 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-04-08 23:50:00 +0400
commit35b483671188ca4bd418c3206809379aff179082 (patch)
tree9d1ec02d4f5da781fba715e490195742bf77a3a7 /source/blender/modifiers/intern
parent1a9a8406fe1dad319d69a3f195255e629365fcaa (diff)
Fix for [#30822] Foam Mapping for Ocean Modifier is out of sync in Blender Internal Render.
We need both a new MLOOPUV and MTEXPOLY layers with generated geometry! For some reason, the loopuv alone seemed to work in 3D view, but definitively not in render.
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c3
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 4119f49dcdb..fd8691991ff 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -353,7 +353,8 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
/* add uvs */
cdlayer= CustomData_number_of_layers(&result->loopData, CD_MLOOPUV);
if (cdlayer < MAX_MTFACE) {
- MLoopUV *mloopuvs= CustomData_add_layer(&result->loopData, CD_MLOOPUV, CD_CALLOC, NULL, num_faces * 4);
+ MLoopUV *mloopuvs = CustomData_add_layer(&result->loopData, CD_MLOOPUV, CD_CALLOC, NULL, num_faces * 4);
+ CustomData_add_layer(&result->polyData, CD_MTEXPOLY, CD_CALLOC, NULL, num_faces);
if (mloopuvs) { /* unlikely to fail */
ix = 1.0 / rx;