diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_warp.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_warp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index a55714e3d5e..7eb1851e08b 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -28,6 +28,7 @@ #include "BLT_translation.h" +#include "DNA_defaults.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" @@ -65,12 +66,11 @@ static void initData(ModifierData *md) { WarpModifierData *wmd = (WarpModifierData *)md; + BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(wmd, modifier)); + + MEMCPY_STRUCT_AFTER(wmd, DNA_struct_default_get(WarpModifierData), modifier); + wmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); - wmd->texture = NULL; - wmd->strength = 1.0f; - wmd->falloff_radius = 1.0f; - wmd->falloff_type = eWarp_Falloff_Smooth; - wmd->flag = 0; } static void copyData(const ModifierData *md, ModifierData *target, const int flag) |