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/gpencil_modifiers/intern/MOD_gpencillattice.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
index 6aa64a97112..098a2edf04a 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
@@ -22,12 +22,14 @@
*/
#include <stdio.h>
+#include <string.h> /* For #MEMCPY_STRUCT_AFTER. */
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
+#include "DNA_defaults.h"
#include "DNA_gpencil_modifier_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_meshdata_types.h"
@@ -65,11 +67,10 @@
static void initData(GpencilModifierData *md)
{
LatticeGpencilModifierData *gpmd = (LatticeGpencilModifierData *)md;
- gpmd->pass_index = 0;
- gpmd->material = NULL;
- gpmd->object = NULL;
- gpmd->cache_data = NULL;
- gpmd->strength = 1.0f;
+
+ BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(gpmd, modifier));
+
+ MEMCPY_STRUCT_AFTER(gpmd, DNA_struct_default_get(LatticeGpencilModifierData), modifier);
}
static void copyData(const GpencilModifierData *md, GpencilModifierData *target)