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:
authorCampbell Barton <ideasman42@gmail.com>2019-09-11 21:34:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-11 21:58:09 +0300
commit9a076dd95a01135ea50f9ccc675668db9f2155f4 (patch)
treea26c4ef274e5fbf469844009e9065e6c6e94ca8c /source/blender/blenkernel/intern/lattice.c
parent2f08a25d8300bc18b588d18bfa8099ead52ff5bb (diff)
DNA: defaults for ID types
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c6
1 files changed, 2 insertions, 4 deletions
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)