Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_undo_system.h
| Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | |||||
| /** #UndoType.flag bitflags. */ | /** #UndoType.flag bitflags. */ | ||||
| typedef enum UndoTypeFlags { | typedef enum UndoTypeFlags { | ||||
| /** | /** | ||||
| * This undo type `encode` callback needs a valid context, it will fail otherwise. | * This undo type `encode` callback needs a valid context, it will fail otherwise. | ||||
| * \note Callback is still supposed to properly deal with a NULL context pointer. | * \note Callback is still supposed to properly deal with a NULL context pointer. | ||||
| */ | */ | ||||
| UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE = 1 << 0, | UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE = 1 << 0, | ||||
| /** | |||||
| * This undo type uses a differential storage (instead of a stateful storage). | |||||
| * It means that you cannot 'load' an undo step, but either 'apply' or 'unapply' it on top | |||||
| * of/from the previous/current state. | |||||
| * | |||||
| * Main implication here is that when undoing, the step n+1 needs to be processed (unapplied), to | |||||
| * make step n the active one. | |||||
| */ | |||||
| UNDOTYPE_DIFFERENTIAL = 1 << 1, | |||||
| } UndoTypeFlags; | } UndoTypeFlags; | ||||
| /* Expose since we need to perform operations on specific undo types (rarely). */ | /* Expose since we need to perform operations on specific undo types (rarely). */ | ||||
| extern const UndoType *BKE_UNDOSYS_TYPE_IMAGE; | extern const UndoType *BKE_UNDOSYS_TYPE_IMAGE; | ||||
| extern const UndoType *BKE_UNDOSYS_TYPE_MEMFILE; | extern const UndoType *BKE_UNDOSYS_TYPE_MEMFILE; | ||||
| extern const UndoType *BKE_UNDOSYS_TYPE_PAINTCURVE; | extern const UndoType *BKE_UNDOSYS_TYPE_PAINTCURVE; | ||||
| extern const UndoType *BKE_UNDOSYS_TYPE_PARTICLE; | extern const UndoType *BKE_UNDOSYS_TYPE_PARTICLE; | ||||
| extern const UndoType *BKE_UNDOSYS_TYPE_SCULPT; | extern const UndoType *BKE_UNDOSYS_TYPE_SCULPT; | ||||
| ▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines | |||||