diff options
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index a3267c0762e..74f78106be5 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -203,6 +203,8 @@ IDTypeInfo IDType_ID_LT = { .blend_read_data = lattice_blend_read_data, .blend_read_lib = lattice_blend_read_lib, .blend_read_expand = lattice_blend_read_expand, + + .blend_read_undo_preserve = NULL, }; int BKE_lattice_index_from_uvw(Lattice *lt, const int u, const int v, const int w) @@ -246,7 +248,7 @@ int BKE_lattice_index_flip( } void BKE_lattice_bitmap_from_flag( - Lattice *lt, BLI_bitmap *bitmap, const short flag, const bool clear, const bool respecthide) + Lattice *lt, BLI_bitmap *bitmap, const uint8_t flag, const bool clear, const bool respecthide) { const unsigned int tot = lt->pntsu * lt->pntsv * lt->pntsw; BPoint *bp; @@ -311,7 +313,7 @@ void BKE_lattice_resize(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb) calc_lat_fudu(lt->flag, vNew, &fv, &dv); calc_lat_fudu(lt->flag, wNew, &fw, &dw); - /* If old size is different then resolution changed in interface, + /* If old size is different than resolution changed in interface, * try to do clever reinit of points. Pretty simply idea, we just * deform new verts by old lattice, but scaling them to match old * size first. @@ -394,20 +396,11 @@ Lattice *BKE_lattice_add(Main *bmain, const char *name) { Lattice *lt; - lt = BKE_libblock_alloc(bmain, ID_LT, name, 0); - - lattice_init_data(<->id); + lt = BKE_id_new(bmain, ID_LT, name); return lt; } -Lattice *BKE_lattice_copy(Main *bmain, const Lattice *lt) -{ - Lattice *lt_copy; - BKE_id_copy(bmain, <->id, (ID **)<_copy); - return lt_copy; -} - bool object_deform_mball(Object *ob, ListBase *dispbase) { if (ob->parent && ob->parent->type == OB_LATTICE && ob->partype == PARSKEL) { |