From 9a076dd95a01135ea50f9ccc675668db9f2155f4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Sep 2019 04:34:55 +1000 Subject: DNA: defaults for ID types --- source/blender/blenkernel/intern/lattice.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/lattice.c') diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index e46b7ca5130..72b531c446a 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -41,6 +41,7 @@ #include "DNA_lattice_types.h" #include "DNA_curve_types.h" #include "DNA_key_types.h" +#include "DNA_defaults.h" #include "BKE_animsys.h" #include "BKE_anim.h" @@ -248,13 +249,10 @@ void BKE_lattice_init(Lattice *lt) { BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(lt, id)); - lt->flag = LT_GRID; - - lt->typeu = lt->typev = lt->typew = KEY_BSPLINE; + MEMCPY_STRUCT_AFTER(lt, DNA_struct_default_get(Lattice), id); lt->def = MEM_callocN(sizeof(BPoint), "lattvert"); /* temporary */ BKE_lattice_resize(lt, 2, 2, 2, NULL); /* creates a uniform lattice */ - lt->actbp = LT_ACTBP_NONE; } Lattice *BKE_lattice_add(Main *bmain, const char *name) -- cgit v1.2.3