diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-11-11 05:17:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-11-11 05:17:32 +0300 |
commit | 25002739c217d1c576104a3bf4cae02113c3bc6f (patch) | |
tree | 7264e20529406001952dfd4fb8d43e78fc4ab3bb /source | |
parent | 4c5477a8dc6e2e42ae13f0732db16df2ff59ed27 (diff) | |
parent | df4f29b928b7fc443b8fe7eb853e6c6a873fc434 (diff) |
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/lattice/editlattice_undo.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/editors/lattice/editlattice_undo.c b/source/blender/editors/lattice/editlattice_undo.c index 2790e6b5558..ed2560698b6 100644 --- a/source/blender/editors/lattice/editlattice_undo.c +++ b/source/blender/editors/lattice/editlattice_undo.c @@ -61,9 +61,13 @@ static CLG_LogRef LOG = {"ed.undo.lattice"}; /** \name Undo Conversion * \{ */ +/* TODO(Campbell): this could contain an entire 'Lattice' struct. */ typedef struct UndoLattice { BPoint *def; int pntsu, pntsv, pntsw, actbp; + char typeu, typev, typew; + float fu, fv, fw; + float du, dv, dw; size_t undo_size; } UndoLattice; @@ -83,6 +87,17 @@ static void undolatt_to_editlatt(UndoLattice *ult, EditLatt *editlatt) editlatt->latt->pntsv = ult->pntsv; editlatt->latt->pntsw = ult->pntsw; editlatt->latt->actbp = ult->actbp; + + editlatt->latt->typeu = ult->typeu; + editlatt->latt->typev = ult->typev; + editlatt->latt->typew = ult->typew; + + editlatt->latt->fu = ult->fu; + editlatt->latt->fv = ult->fv; + editlatt->latt->fw = ult->fw; + editlatt->latt->du = ult->du; + editlatt->latt->dv = ult->dv; + editlatt->latt->dw = ult->dw; } static void *undolatt_from_editlatt(UndoLattice *ult, EditLatt *editlatt) @@ -95,6 +110,17 @@ static void *undolatt_from_editlatt(UndoLattice *ult, EditLatt *editlatt) ult->pntsw = editlatt->latt->pntsw; ult->actbp = editlatt->latt->actbp; + ult->typeu = editlatt->latt->typeu; + ult->typev = editlatt->latt->typev; + ult->typew = editlatt->latt->typew; + + ult->fu = editlatt->latt->fu; + ult->fv = editlatt->latt->fv; + ult->fw = editlatt->latt->fw; + ult->du = editlatt->latt->du; + ult->dv = editlatt->latt->dv; + ult->dw = editlatt->latt->dw; + ult->undo_size += sizeof(*ult->def) * ult->pntsu * ult->pntsv * ult->pntsw; return ult; |