diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-09-22 12:52:48 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-09-22 12:54:53 +0300 |
commit | 2db84a8ee7cd3873e11eb0c13abc09869caa0042 (patch) | |
tree | ea15209cc9742e23f36a7e692eb837723bfa64b3 /source/blender/editors/lattice/editlattice_undo.c | |
parent | a41ee7ea1ae9bb1bcc537576d9ffdb3bca3201f3 (diff) |
Fix all merge conflicts
There was a lot of conflicts and to solve, I refresh manually the source folders.
Diffstat (limited to 'source/blender/editors/lattice/editlattice_undo.c')
-rw-r--r-- | source/blender/editors/lattice/editlattice_undo.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/lattice/editlattice_undo.c b/source/blender/editors/lattice/editlattice_undo.c index 7615a57c8fe..b77786b2421 100644 --- a/source/blender/editors/lattice/editlattice_undo.c +++ b/source/blender/editors/lattice/editlattice_undo.c @@ -46,7 +46,7 @@ static CLG_LogRef LOG = {"ed.undo.lattice"}; /** \name Undo Conversion * \{ */ -/* TODO(Campbell): this could contain an entire 'Lattice' struct. */ +/* TODO(@campbellbarton): this could contain an entire 'Lattice' struct. */ typedef struct UndoLattice { BPoint *def; int pntsu, pntsv, pntsw, actbp; @@ -131,8 +131,10 @@ static int validate_undoLatt(void *data, void *edata) static Object *editlatt_object_from_context(bContext *C) { + Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); - Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer); + BKE_view_layer_synced_ensure(scene, view_layer); + Object *obedit = BKE_view_layer_edit_object_get(view_layer); if (obedit && obedit->type == OB_LATTICE) { Lattice *lt = obedit->data; if (lt->editlatt != NULL) { @@ -173,9 +175,10 @@ static bool lattice_undosys_step_encode(struct bContext *C, Main *bmain, UndoSte /* Important not to use the 3D view when getting objects because all objects * outside of this list will be moved out of edit-mode when reading back undo steps. */ + const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); uint objects_len = 0; - Object **objects = ED_undo_editmode_objects_from_view_layer(view_layer, &objects_len); + Object **objects = ED_undo_editmode_objects_from_view_layer(scene, view_layer, &objects_len); us->elems = MEM_callocN(sizeof(*us->elems) * objects_len, __func__); us->elems_len = objects_len; |