Blender V4.3
paint_curve_undo.cc File Reference
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_brush_types.h"
#include "BKE_paint.hh"
#include "BKE_undo_system.hh"
#include "ED_paint.hh"
#include "ED_undo.hh"
#include "WM_api.hh"
#include "paint_intern.hh"
#include "BLI_array_utils.h"

Go to the source code of this file.

Classes

struct  UndoCurve
 
struct  PaintCurveUndoStep
 

Functions

Undo Conversion
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
static bool paintcurve_undosys_poll (bContext *C)
 
static void paintcurve_undosys_step_encode_init (bContext *C, UndoStep *us_p)
 
static bool paintcurve_undosys_step_encode (bContext *C, Main *, UndoStep *us_p)
 
static void paintcurve_undosys_step_decode (bContext *, Main *, UndoStep *us_p, const eUndoStepDir, bool)
 
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)
 
Utilities
void ED_paintcurve_undo_push_begin (const char *name)
 
void ED_paintcurve_undo_push_end (bContext *C)
 

Function Documentation

◆ ED_paintcurve_undo_push_begin()

◆ ED_paintcurve_undo_push_end()

◆ ED_paintcurve_undosys_type()

◆ paintcurve_undosys_foreach_ID_ref()

static void paintcurve_undosys_foreach_ID_ref ( UndoStep * us_p,
UndoTypeForEachIDRefFn foreach_ID_ref_fn,
void * user_data )
static

Definition at line 130 of file paint_curve_undo.cc.

References PaintCurveUndoStep::pc_ref.

Referenced by ED_paintcurve_undosys_type().

◆ paintcurve_undosys_poll()

static bool paintcurve_undosys_poll ( bContext * C)
static

◆ paintcurve_undosys_step_decode()

static void paintcurve_undosys_step_decode ( bContext * ,
Main * ,
UndoStep * us_p,
const eUndoStepDir ,
bool  )
static

◆ paintcurve_undosys_step_encode()

◆ paintcurve_undosys_step_encode_init()

static void paintcurve_undosys_step_encode_init ( bContext * C,
UndoStep * us_p )
static

Definition at line 84 of file paint_curve_undo.cc.

References UNUSED_VARS.

Referenced by ED_paintcurve_undosys_type().

◆ paintcurve_undosys_step_free()

static void paintcurve_undosys_step_free ( UndoStep * us_p)
static

Definition at line 124 of file paint_curve_undo.cc.

References PaintCurveUndoStep::data, and undocurve_free_data().

Referenced by ED_paintcurve_undosys_type().

◆ undocurve_free_data()

static void undocurve_free_data ( UndoCurve * uc)
static

Definition at line 55 of file paint_curve_undo.cc.

References MEM_SAFE_FREE, and UndoCurve::points.

Referenced by paintcurve_undosys_step_free().

◆ undocurve_from_paintcurve()

◆ undocurve_to_paintcurve()

static void undocurve_to_paintcurve ( const UndoCurve * uc,
PaintCurve * pc )
static