Blender V4.3
UndoType Struct Reference

#include <BKE_undo_system.hh>

Public Attributes

UndoTypenext
 
UndoTypeprev
 
const char * name
 
bool(* poll )(struct bContext *C)
 
void(* step_encode_init )(bContext *C, UndoStep *us)
 
bool(* step_encode )(bContext *C, Main *bmain, UndoStep *us)
 
void(* step_decode )(bContext *C, 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 105 of file BKE_undo_system.hh.

Member Data Documentation

◆ flags

◆ name

◆ next

UndoType* UndoType::next

Definition at line 106 of file BKE_undo_system.hh.

◆ 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 116 of file BKE_undo_system.hh.

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_text_undosys_type(), ED_undosys_type_grease_pencil(), blender::ed::sculpt_paint::undo::register_type(), and blender::ed::curves::undosys_type_register().

◆ prev

UndoType * UndoType::prev

Definition at line 106 of file BKE_undo_system.hh.

◆ step_decode

◆ step_encode

◆ step_encode_init

void(* UndoType::step_encode_init) (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 124 of file BKE_undo_system.hh.

Referenced by BKE_undosys_step_push_init_with_type(), ED_image_undosys_type(), ED_paintcurve_undosys_type(), ED_text_undosys_type(), and blender::ed::sculpt_paint::undo::register_type().

◆ step_foreach_ID_ref

◆ step_free

◆ step_size


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