Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_wave.c')
-rw-r--r--source/blender/modifiers/intern/MOD_wave.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index 580697486b3..3862b627a56 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -27,6 +27,7 @@
#include "BLT_translation.h"
+#include "DNA_defaults.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
@@ -63,21 +64,9 @@ static void initData(ModifierData *md)
{
WaveModifierData *wmd = (WaveModifierData *)md; // whadya know, moved here from Iraq
- wmd->flag |= (MOD_WAVE_X | MOD_WAVE_Y | MOD_WAVE_CYCL | MOD_WAVE_NORM_X | MOD_WAVE_NORM_Y |
- MOD_WAVE_NORM_Z);
-
- wmd->objectcenter = NULL;
- wmd->texture = NULL;
- wmd->map_object = NULL;
- wmd->height = 0.5f;
- wmd->width = 1.5f;
- wmd->speed = 0.25f;
- wmd->narrow = 1.5f;
- wmd->lifetime = 0.0f;
- wmd->damp = 10.0f;
- wmd->falloff = 0.0f;
- wmd->texmapping = MOD_DISP_MAP_LOCAL;
- wmd->defgrp_name[0] = 0;
+ BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(wmd, modifier));
+
+ MEMCPY_STRUCT_AFTER(wmd, DNA_struct_default_get(WaveModifierData), modifier);
}
static bool dependsOnTime(ModifierData *UNUSED(md))