Blender  V3.3
Classes | Variables
editlattice_undo.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "CLG_log.h"
#include "BLI_array_utils.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_undo_system.h"
#include "DEG_depsgraph.h"
#include "ED_lattice.h"
#include "ED_object.h"
#include "ED_undo.h"
#include "ED_util.h"
#include "WM_api.h"
#include "WM_types.h"
#include "lattice_intern.h"

Go to the source code of this file.

Classes

struct  UndoLattice
 
struct  LatticeUndoStep_Elem
 
struct  LatticeUndoStep
 

Variables

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

Undo Conversion

typedef struct UndoLattice UndoLattice
 
static void undolatt_to_editlatt (UndoLattice *ult, EditLatt *editlatt)
 
static voidundolatt_from_editlatt (UndoLattice *ult, EditLatt *editlatt)
 
static void undolatt_free_data (UndoLattice *ult)
 
static Objecteditlatt_object_from_context (bContext *C)
 

Implements ED Undo System

Note
This is similar for all edit-mode types.
typedef struct LatticeUndoStep_Elem LatticeUndoStep_Elem
 
typedef struct LatticeUndoStep LatticeUndoStep
 
static bool lattice_undosys_poll (bContext *C)
 
static bool lattice_undosys_step_encode (struct bContext *C, Main *bmain, UndoStep *us_p)
 
static void lattice_undosys_step_decode (struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final))
 
static void lattice_undosys_step_free (UndoStep *us_p)
 
static void lattice_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
 
void ED_lattice_undosys_type (UndoType *ut)
 

Typedef Documentation

◆ LatticeUndoStep

◆ LatticeUndoStep_Elem

◆ UndoLattice

typedef struct UndoLattice UndoLattice

Function Documentation

◆ ED_lattice_undosys_type()

void ED_lattice_undosys_type ( struct UndoType ut)

◆ editlatt_object_from_context()

static Object* editlatt_object_from_context ( bContext C)
static

◆ lattice_undosys_foreach_ID_ref()

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

◆ lattice_undosys_poll()

static bool lattice_undosys_poll ( bContext C)
static

Definition at line 187 of file editlattice_undo.c.

References C, editlatt_object_from_context(), and NULL.

Referenced by ED_lattice_undosys_type(), and lattice_undosys_step_decode().

◆ lattice_undosys_step_decode()

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

◆ lattice_undosys_step_encode()

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

◆ lattice_undosys_step_free()

static void lattice_undosys_step_free ( UndoStep us_p)
static

◆ undolatt_free_data()

static void undolatt_free_data ( UndoLattice ult)
static

◆ undolatt_from_editlatt()

static void* undolatt_from_editlatt ( UndoLattice ult,
EditLatt editlatt 
)
static

◆ undolatt_to_editlatt()

static void undolatt_to_editlatt ( UndoLattice ult,
EditLatt editlatt 
)
static

Variable Documentation

◆ LOG

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

We only need this locally.

Definition at line 45 of file editlattice_undo.c.

Referenced by lattice_undosys_step_decode().