diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-31 03:34:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-31 04:07:13 +0300 |
commit | 51bba03b319319d59f739673c3fafb71bc308e0d (patch) | |
tree | 239eaf352608f35d924061002d4fcb8adb4f3749 /source/blender/editors/curve | |
parent | d16e4d077dfe4ac887b51075784170911d3adca5 (diff) |
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.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve_undo.c | 4 | ||||
-rw-r--r-- | source/blender/editors/curve/editfont_undo.c | 4 |
2 files changed, 4 insertions, 4 deletions
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); 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); |