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_build.c')
-rw-r--r--source/blender/modifiers/intern/MOD_build.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index ac6c28e24c9..931a20f84fc 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -29,6 +29,7 @@
#include "BLI_math_vector.h"
#include "BLI_rand.h"
+#include "DNA_defaults.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
@@ -55,8 +56,9 @@ static void initData(ModifierData *md)
{
BuildModifierData *bmd = (BuildModifierData *)md;
- bmd->start = 1.0;
- bmd->length = 100.0;
+ BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(bmd, modifier));
+
+ MEMCPY_STRUCT_AFTER(bmd, DNA_struct_default_get(BuildModifierData), modifier);
}
static bool dependsOnTime(ModifierData *UNUSED(md))