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/editcurve_undo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/curve/editcurve_undo.c') diff --git a/source/blender/editors/curve/editcurve_undo.c b/source/blender/editors/curve/editcurve_undo.c index 9163272fbf2..282b3722d3b 100644 --- a/source/blender/editors/curve/editcurve_undo.c +++ b/source/blender/editors/curve/editcurve_undo.c @@ -214,7 +214,7 @@ static bool curve_undosys_poll(bContext *C) return (obedit != NULL); } -static bool curve_undosys_step_encode(struct bContext *C, UndoStep *us_p) +static bool curve_undosys_step_encode(struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p) { CurveUndoStep *us = (CurveUndoStep *)us_p; @@ -237,7 +237,7 @@ static bool curve_undosys_step_encode(struct bContext *C, UndoStep *us_p) return true; } -static void curve_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNUSED(dir)) +static void curve_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