From 2db84a8ee7cd3873e11eb0c13abc09869caa0042 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 22 Sep 2022 11:52:48 +0200 Subject: Fix all merge conflicts There was a lot of conflicts and to solve, I refresh manually the source folders. --- source/blender/editors/lattice/editlattice_undo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/lattice/editlattice_undo.c') 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; -- cgit v1.2.3