From a016ad2ea8d718a8f48be841fe463bc5a54e3be8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Mar 2019 15:05:04 +0100 Subject: Fix part of T60735: invalid CD_ORIGINDEX data in some modifier stack evaluations. BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0, which was never filled in correctly. In 2.7 the equivalent function used to modify the source derivedmesh and add valid original indices to it, but this is no longer possible in the new design and was quite unpredictable anyway. Now instead rely on mesh_calc_modifiers and the depsgraph to determine when CD_ORIGINDEX should be added. --- source/blender/modifiers/intern/MOD_ocean.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'source/blender/modifiers') diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index b14e6d64ab0..5e2183030db 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -176,7 +176,6 @@ typedef struct GenerateOceanGeometryData { MVert *mverts; MPoly *mpolys; MLoop *mloops; - int *origindex; MLoopUV *mloopuvs; int res_x, res_y; @@ -230,9 +229,6 @@ static void generate_ocean_geometry_polygons( mp->totloop = 4; mp->flag |= ME_SMOOTH; - - /* generated geometry does not map to original faces */ - gogd->origindex[fi] = ORIGINDEX_NONE; } } @@ -299,8 +295,6 @@ static Mesh *generate_ocean_geometry(OceanModifierData *omd) gogd.mpolys = result->mpoly; gogd.mloops = result->mloop; - gogd.origindex = CustomData_get_layer(&result->pdata, CD_ORIGINDEX); - ParallelRangeSettings settings; BLI_parallel_range_settings_defaults(&settings); settings.use_threading = use_threading; -- cgit v1.2.3