Blender
V3.3
|
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_brush_types.h"
#include "DNA_space_types.h"
#include "BLI_array_utils.h"
#include "BKE_context.h"
#include "BKE_paint.h"
#include "BKE_undo_system.h"
#include "ED_paint.h"
#include "ED_undo.h"
#include "WM_api.h"
#include "paint_intern.h"
Go to the source code of this file.
Classes | |
struct | UndoCurve |
struct | PaintCurveUndoStep |
Functions | |
Utilities | |
void | ED_paintcurve_undo_push_begin (const char *name) |
void | ED_paintcurve_undo_push_end (bContext *C) |
Undo Conversion | |
typedef struct UndoCurve | UndoCurve |
static void | undocurve_from_paintcurve (UndoCurve *uc, const PaintCurve *pc) |
static void | undocurve_to_paintcurve (const UndoCurve *uc, PaintCurve *pc) |
static void | undocurve_free_data (UndoCurve *uc) |
Implements ED Undo System | |
typedef struct PaintCurveUndoStep | PaintCurveUndoStep |
static bool | paintcurve_undosys_poll (bContext *C) |
static void | paintcurve_undosys_step_encode_init (struct bContext *C, UndoStep *us_p) |
static bool | paintcurve_undosys_step_encode (struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p) |
static void | paintcurve_undosys_step_decode (struct bContext *UNUSED(C), struct Main *UNUSED(bmain), UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final)) |
static void | paintcurve_undosys_step_free (UndoStep *us_p) |
static void | paintcurve_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data) |
void | ED_paintcurve_undosys_type (UndoType *ut) |
typedef struct PaintCurveUndoStep PaintCurveUndoStep |
void ED_paintcurve_undo_push_begin | ( | const char * | name | ) |
Definition at line 158 of file paint_curve_undo.c.
References BKE_undosys_step_push_init_with_type(), BKE_UNDOSYS_TYPE_PAINTCURVE, C, ED_undo_stack_get(), and NULL.
Referenced by paintcurve_delete_point_exec(), paintcurve_point_add(), paintcurve_point_select(), and paintcurve_slide_modal().
Definition at line 165 of file paint_curve_undo.c.
References BKE_undosys_stack_limit_steps_and_memory_defaults, BKE_undosys_step_push(), C, ED_undo_stack_get(), NULL, and WM_file_tag_modified().
Referenced by paintcurve_delete_point_exec(), paintcurve_point_add(), paintcurve_point_select(), and paintcurve_slide_modal().
Export for ED_undo_sys.
Definition at line 136 of file paint_curve_undo.c.
References UndoType::flags, UndoType::name, paintcurve_undosys_foreach_ID_ref(), paintcurve_undosys_poll(), paintcurve_undosys_step_decode(), paintcurve_undosys_step_encode(), paintcurve_undosys_step_encode_init(), paintcurve_undosys_step_free(), UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_encode_init, UndoType::step_foreach_ID_ref, UndoType::step_free, and UndoType::step_size.
Referenced by ED_undosys_type_init().
|
static |
Definition at line 128 of file paint_curve_undo.c.
References PaintCurveUndoStep::pc_ref, and user_data.
Referenced by ED_paintcurve_undosys_type().
Definition at line 72 of file paint_curve_undo.c.
References BKE_paint_get_active_from_context(), Paint::brush, C, NULL, Brush::paint_curve, and paint_curve_poll().
Referenced by ED_paintcurve_undosys_type().
|
static |
Definition at line 112 of file paint_curve_undo.c.
References PaintCurveUndoStep::data, PaintCurveUndoStep::pc_ref, and undocurve_to_paintcurve().
Referenced by ED_paintcurve_undosys_type().
|
static |
Definition at line 87 of file paint_curve_undo.c.
References BKE_paint_get_active_from_context(), BLI_assert, Paint::brush, C, PaintCurveUndoStep::data, UndoStep::data_size, NULL, Brush::paint_curve, paint_curve_poll(), PaintCurveUndoStep::pc_ref, PaintCurveUndoStep::step, and undocurve_from_paintcurve().
Referenced by ED_paintcurve_undosys_type().
Definition at line 81 of file paint_curve_undo.c.
References C, and UNUSED_VARS.
Referenced by ED_paintcurve_undosys_type().
Definition at line 122 of file paint_curve_undo.c.
References PaintCurveUndoStep::data, and undocurve_free_data().
Referenced by ED_paintcurve_undosys_type().
Definition at line 53 of file paint_curve_undo.c.
References MEM_SAFE_FREE, and UndoCurve::points.
Referenced by paintcurve_undosys_step_free().
|
static |
Definition at line 37 of file paint_curve_undo.c.
References UndoCurve::add_index, PaintCurve::add_index, BLI_array_is_zeroed, BLI_assert, MEM_dupallocN, UndoCurve::points, PaintCurve::points, UndoCurve::tot_points, and PaintCurve::tot_points.
Referenced by paintcurve_undosys_step_encode().
|
static |
Definition at line 45 of file paint_curve_undo.c.
References UndoCurve::add_index, PaintCurve::add_index, MEM_dupallocN, MEM_SAFE_FREE, UndoCurve::points, PaintCurve::points, UndoCurve::tot_points, and PaintCurve::tot_points.
Referenced by paintcurve_undosys_step_decode().