From 51bba03b319319d59f739673c3fafb71bc308e0d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 31 Jan 2019 11:34:57 +1100 Subject: Undo System: add Main argument to encode/decode Needed since we don't always have the context, and avoids adding G_MAIN into undo callbacks. --- source/blender/editors/curve/editfont_undo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/curve/editfont_undo.c') diff --git a/source/blender/editors/curve/editfont_undo.c b/source/blender/editors/curve/editfont_undo.c index 85e361b495f..ab6ef4b4728 100644 --- a/source/blender/editors/curve/editfont_undo.c +++ b/source/blender/editors/curve/editfont_undo.c @@ -339,7 +339,7 @@ static bool font_undosys_poll(bContext *C) return editfont_object_from_context(C) != NULL; } -static bool font_undosys_step_encode(struct bContext *C, UndoStep *us_p) +static bool font_undosys_step_encode(struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p) { FontUndoStep *us = (FontUndoStep *)us_p; us->obedit_ref.ptr = editfont_object_from_context(C); @@ -349,7 +349,7 @@ static bool font_undosys_step_encode(struct bContext *C, UndoStep *us_p) return true; } -static void font_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNUSED(dir)) +static void font_undosys_step_decode(struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p, int UNUSED(dir)) { /* TODO(campbell): undo_system: use low-level API to set mode. */ ED_object_mode_set(C, OB_MODE_EDIT); -- cgit v1.2.3