Blender  V3.3
Classes | Variables
editcurve_undo.c File Reference
#include "MEM_guardedalloc.h"
#include "CLG_log.h"
#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_array_utils.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BKE_anim_data.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_undo_system.h"
#include "DEG_depsgraph.h"
#include "ED_curve.h"
#include "ED_undo.h"
#include "WM_api.h"
#include "WM_types.h"
#include "curve_intern.h"

Go to the source code of this file.

Classes

struct  UndoCurve
 
struct  CurveUndoStep_Elem
 
struct  CurveUndoStep
 

Functions

Undo Conversion
static void undocurve_to_editcurve (Main *bmain, UndoCurve *ucu, Curve *cu, short *r_shapenr)
 
static void undocurve_from_editcurve (UndoCurve *ucu, Curve *cu, const short shapenr)
 
static void undocurve_free_data (UndoCurve *uc)
 
static Objecteditcurve_object_from_context (bContext *C)
 

Variables

static CLG_LogRef LOG = {"ed.undo.curve"}
 

Implements ED Undo System

Note
This is similar for all edit-mode types.
typedef struct CurveUndoStep_Elem CurveUndoStep_Elem
 
typedef struct CurveUndoStep CurveUndoStep
 
static bool curve_undosys_poll (bContext *C)
 
static bool curve_undosys_step_encode (struct bContext *C, struct Main *bmain, UndoStep *us_p)
 
static void curve_undosys_step_decode (struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final))
 
static void curve_undosys_step_free (UndoStep *us_p)
 
static void curve_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
 
void ED_curve_undosys_type (UndoType *ut)
 

Typedef Documentation

◆ CurveUndoStep

typedef struct CurveUndoStep CurveUndoStep

◆ CurveUndoStep_Elem

Function Documentation

◆ curve_undosys_foreach_ID_ref()

static void curve_undosys_foreach_ID_ref ( UndoStep us_p,
UndoTypeForEachIDRefFn  foreach_ID_ref_fn,
void user_data 
)
static

◆ curve_undosys_poll()

static bool curve_undosys_poll ( bContext C)
static

Definition at line 193 of file editcurve_undo.c.

References C, editcurve_object_from_context(), and NULL.

Referenced by curve_undosys_step_decode(), and ED_curve_undosys_type().

◆ curve_undosys_step_decode()

static void curve_undosys_step_decode ( struct bContext C,
struct Main bmain,
UndoStep us_p,
const eUndoStepDir   UNUSEDdir,
bool   UNUSEDis_final 
)
static

◆ curve_undosys_step_encode()

static bool curve_undosys_step_encode ( struct bContext C,
struct Main bmain,
UndoStep us_p 
)
static

◆ curve_undosys_step_free()

static void curve_undosys_step_free ( UndoStep us_p)
static

◆ ED_curve_undosys_type()

void ED_curve_undosys_type ( struct UndoType ut)

◆ editcurve_object_from_context()

static Object* editcurve_object_from_context ( bContext C)
static

◆ undocurve_free_data()

static void undocurve_free_data ( UndoCurve uc)
static

◆ undocurve_from_editcurve()

static void undocurve_from_editcurve ( UndoCurve ucu,
Curve cu,
const short  shapenr 
)
static

◆ undocurve_to_editcurve()

static void undocurve_to_editcurve ( Main bmain,
UndoCurve ucu,
Curve cu,
short *  r_shapenr 
)
static

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"ed.undo.curve"}
static

We only need this locally.

Definition at line 39 of file editcurve_undo.c.

Referenced by curve_undosys_step_decode().