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/sculpt_paint/paint_curve_undo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint/paint_curve_undo.c') diff --git a/source/blender/editors/sculpt_paint/paint_curve_undo.c b/source/blender/editors/sculpt_paint/paint_curve_undo.c index 59f424a9f31..9e116a5a3aa 100644 --- a/source/blender/editors/sculpt_paint/paint_curve_undo.c +++ b/source/blender/editors/sculpt_paint/paint_curve_undo.c @@ -98,7 +98,7 @@ static void paintcurve_undosys_step_encode_init(struct bContext *C, UndoStep *us UNUSED_VARS(C, us_p); } -static bool paintcurve_undosys_step_encode(struct bContext *C, UndoStep *us_p) +static bool paintcurve_undosys_step_encode(struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p) { Paint *p = BKE_paint_get_active_from_context(C); PaintCurve *pc = p ? (p->brush ? p->brush->paint_curve : NULL) : NULL; @@ -115,7 +115,7 @@ static bool paintcurve_undosys_step_encode(struct bContext *C, UndoStep *us_p) return true; } -static void paintcurve_undosys_step_decode(struct bContext *UNUSED(C), UndoStep *us_p, int UNUSED(dir)) +static void paintcurve_undosys_step_decode(struct bContext *UNUSED(C), struct Main *UNUSED(bmain), UndoStep *us_p, int UNUSED(dir)) { PaintCurveUndoStep *us = (PaintCurveUndoStep *)us_p; undocurve_to_paintcurve(&us->data, us->pc); -- cgit v1.2.3