diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 11 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_subsurf.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_surface.c | 17 |
3 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 98f455e186c..0b29c6bb64b 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -66,6 +66,15 @@ static void initData(ModifierData *md) mmd->quality = 3; } +static void copyData(const ModifierData *md_src, ModifierData *md_dst, const int flag) +{ + MultiresModifierData *mmd_dst = (MultiresModifierData *)md_dst; + + modifier_copyData_generic(md_src, md_dst, flag); + + mmd_dst->subdiv = NULL; +} + static void freeData(ModifierData *md) { MultiresModifierData *mmd = (MultiresModifierData *) md; @@ -193,7 +202,7 @@ ModifierTypeInfo modifierType_Multires = { eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_RequiresOriginalData, - /* copyData */ modifier_copyData_generic, + /* copyData */ copyData, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index 3cabd1131cb..347ac306f3d 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -75,6 +75,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla modifier_copyData_generic(md, target, flag); tsmd->emCache = tsmd->mCache = NULL; + tsmd->subdiv = NULL; } static void freeData(ModifierData *md) diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index a7198b5721e..248292ded35 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -59,6 +59,21 @@ static void initData(ModifierData *md) SurfaceModifierData *surmd = (SurfaceModifierData *) md; surmd->bvhtree = NULL; + surmd->mesh = NULL; + surmd->x = NULL; + surmd->v = NULL; +} + +static void copyData(const ModifierData *md_src, ModifierData *md_dst, const int flag) +{ + SurfaceModifierData *surmd_dst = (SurfaceModifierData *)md_dst; + + modifier_copyData_generic(md_src, md_dst, flag); + + surmd_dst->bvhtree = NULL; + surmd_dst->mesh = NULL; + surmd_dst->x = NULL; + surmd_dst->v = NULL; } static void freeData(ModifierData *md) @@ -194,7 +209,7 @@ ModifierTypeInfo modifierType_Surface = { eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_NoUserAdd, - /* copyData */ NULL, + /* copyData */ copyData, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, |