Blender  V3.3
Public Attributes | List of all members
UndoType Struct Reference

#include <BKE_undo_system.h>

Public Attributes

struct UndoTypenext
 
struct UndoTypeprev
 
const char * name
 
bool(* poll )(struct bContext *C)
 
void(* step_encode_init )(struct bContext *C, UndoStep *us)
 
bool(* step_encode )(struct bContext *C, struct Main *bmain, UndoStep *us)
 
void(* step_decode )(struct bContext *C, struct Main *bmain, UndoStep *us, eUndoStepDir dir, bool is_final)
 
void(* step_free )(UndoStep *us)
 
void(* step_foreach_ID_ref )(UndoStep *us, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
 
uint flags
 
size_t step_size
 

Detailed Description

Definition at line 99 of file BKE_undo_system.h.

Member Data Documentation

◆ flags

uint UndoType::flags

◆ name

const char* UndoType::name

◆ next

struct UndoType* UndoType::next

Definition at line 100 of file BKE_undo_system.h.

◆ poll

bool(* UndoType::poll) (struct bContext *C)

When NULL, we don't consider this undo type for context checks. Operators must explicitly set the undo type and handle adding the undo step. This is needed when tools operate on data which isn't the primary mode (eg, paint-curve in sculpt mode).

Definition at line 110 of file BKE_undo_system.h.

Referenced by ED_armature_undosys_type(), ED_curve_undosys_type(), ED_font_undosys_type(), ED_image_undosys_type(), ED_lattice_undosys_type(), ED_mball_undosys_type(), ED_memfile_undosys_type(), ED_mesh_undosys_type(), ED_paintcurve_undosys_type(), ED_particle_undosys_type(), ED_sculpt_undosys_type(), and ED_text_undosys_type().

◆ prev

struct UndoType * UndoType::prev

Definition at line 100 of file BKE_undo_system.h.

◆ step_decode

void(* UndoType::step_decode) (struct bContext *C, struct Main *bmain, UndoStep *us, eUndoStepDir dir, bool is_final)

◆ step_encode

bool(* UndoType::step_encode) (struct bContext *C, struct Main *bmain, UndoStep *us)

◆ step_encode_init

void(* UndoType::step_encode_init) (struct bContext *C, UndoStep *us)

None of these callbacks manage list add/removal.

Note that 'step_encode_init' is optional, some undo types need to perform operations before undo push finishes.

Definition at line 118 of file BKE_undo_system.h.

Referenced by BKE_undosys_step_push_init_with_type(), ED_image_undosys_type(), ED_paintcurve_undosys_type(), ED_sculpt_undosys_type(), and ED_text_undosys_type().

◆ step_foreach_ID_ref

void(* UndoType::step_foreach_ID_ref) (UndoStep *us, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)

◆ step_free

void(* UndoType::step_free) (UndoStep *us)

◆ step_size

size_t UndoType::step_size

The documentation for this struct was generated from the following file: