Blender  V3.3
Classes
paint_curve_undo.c File Reference
#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 Documentation

◆ PaintCurveUndoStep

◆ UndoCurve

typedef struct UndoCurve UndoCurve

Function Documentation

◆ ED_paintcurve_undo_push_begin()

void ED_paintcurve_undo_push_begin ( const char *  name)

◆ ED_paintcurve_undo_push_end()

void ED_paintcurve_undo_push_end ( bContext C)

◆ ED_paintcurve_undosys_type()

void ED_paintcurve_undosys_type ( struct UndoType ut)

◆ 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 128 of file paint_curve_undo.c.

References PaintCurveUndoStep::pc_ref, and user_data.

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 ( struct bContext UNUSEDC,
struct Main UNUSEDbmain,
UndoStep us_p,
const eUndoStepDir   UNUSEDdir,
bool   UNUSEDis_final 
)
static

◆ paintcurve_undosys_step_encode()

static bool paintcurve_undosys_step_encode ( struct bContext C,
struct Main UNUSEDbmain,
UndoStep us_p 
)
static

◆ paintcurve_undosys_step_encode_init()

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

Definition at line 81 of file paint_curve_undo.c.

References C, and 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 122 of file paint_curve_undo.c.

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 53 of file paint_curve_undo.c.

References MEM_SAFE_FREE, and UndoCurve::points.

Referenced by paintcurve_undosys_step_free().

◆ undocurve_from_paintcurve()

static void undocurve_from_paintcurve ( UndoCurve uc,
const PaintCurve pc 
)
static

◆ undocurve_to_paintcurve()

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