diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 15:51:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 15:51:42 +0400 |
commit | f9e00b5c99ba8dfc5bf19a59ab73d8be8f125bf3 (patch) | |
tree | cea447f44b698dcf9a69fc45db887dce638aa89e /source/blender/modifiers/intern/MOD_ocean.c | |
parent | 33e74e9f938bc4e8a733b82c33b9a1113dfb5904 (diff) | |
parent | fd742566a62151c1f2ed1f009782fc8a881fbf5a (diff) |
svn merge ^/trunk/blender -r42009:42053
Diffstat (limited to 'source/blender/modifiers/intern/MOD_ocean.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_ocean.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index d5c36f25a32..9377fdc115d 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -127,7 +127,7 @@ static void initData(ModifierData *md) omd->repeat_x = 1; omd->repeat_y = 1; - modifier_path_init(omd->cachepath, sizeof(omd->cachepath), "ocean_cache"); + modifier_path_init(omd->cachepath, sizeof(omd->cachepath), "cache_ocean"); omd->cached = 0; omd->bakestart = 1; @@ -277,6 +277,7 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd) MVert *mv; MFace *mf; MTFace *tf; + int *origindex; int cdlayer; @@ -305,6 +306,7 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd) mv = CDDM_get_verts(result); mf = CDDM_get_faces(result); + origindex= result->getFaceDataArray(result, CD_ORIGINDEX); /* create vertices */ #pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES) @@ -329,6 +331,9 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd) mf[fi].v4 = vi + res_x+1; mf[fi].flag |= ME_SMOOTH; + + /* generated geometry does not map to original faces */ + origindex[fi] = ORIGINDEX_NONE; } } |