[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45475] trunk/blender/source/blender/ modifiers/intern/MOD_ocean.c: Fix for [#30822] Foam Mapping for Ocean Modifier is out of sync in Blender Internal Render.
Bastien Montagne
montagne29 at wanadoo.fr
Sun Apr 8 21:50:00 CEST 2012
Revision: 45475
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45475
Author: mont29
Date: 2012-04-08 19:50:00 +0000 (Sun, 08 Apr 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/modifiers/intern/MOD_ocean.c
Modified: trunk/blender/source/blender/modifiers/intern/MOD_ocean.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_ocean.c 2012-04-08 16:19:13 UTC (rev 45474)
+++ trunk/blender/source/blender/modifiers/intern/MOD_ocean.c 2012-04-08 19:50:00 UTC (rev 45475)
@@ -353,7 +353,8 @@
/* 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;
More information about the Bf-blender-cvs
mailing list