45 #include "../depsgraph/DEG_depsgraph.h"
54 #include "../blenloader/BLO_undofile.h"
118 ID *
id = *id_pointer;
120 bool do_stop_iter =
true;
124 if (ob_self->
data ==
id) {
134 do_stop_iter =
false;
153 bool use_old_bmain_data =
true;
156 use_old_bmain_data =
false;
164 use_old_bmain_data =
false;
176 if (us_next !=
NULL) {
178 use_old_bmain_data =
false;
186 if (use_old_bmain_data) {
199 us_iter->is_applied =
false;
201 for (
UndoStep *us_iter = us_p; us_iter; us_iter = us_iter->
prev) {
205 us_iter->is_applied =
true;
212 if (use_old_bmain_data) {
240 id->recalc_after_undo_push = 0;
242 if (nodetree !=
NULL) {
265 if (us_next_p !=
NULL) {
277 ut->
name =
"Global Undo";
338 mem_chunk->is_identical_future =
false;
struct MemFileUndoData * BKE_memfile_undo_encode(struct Main *bmain, struct MemFileUndoData *mfu_prev)
void BKE_memfile_undo_free(struct MemFileUndoData *mfu)
bool BKE_memfile_undo_decode(struct MemFileUndoData *mfu, const enum eUndoStepDir undo_direction, const bool use_old_bmain_data, struct bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
void BKE_library_foreach_ID_link(struct Main *bmain, struct ID *id, LibraryIDLinkCallback callback, void *user_data, int flag)
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
struct bNodeTree * ntreeFromID(struct ID *id)
struct GHash * BKE_scene_undo_depsgraphs_extract(struct Main *bmain)
void BKE_scene_undo_depsgraphs_restore(struct Main *bmain, struct GHash *depsgraph_extract)
const UndoType * BKE_UNDOSYS_TYPE_MEMFILE
#define BKE_UNDOSYS_TYPE_IS_MEMFILE_SKIP(ty)
UndoStep * BKE_undosys_stack_active_with_type(UndoStack *ustack, const UndoType *ut)
UndoStep * BKE_undosys_step_same_type_next(UndoStep *us)
UndoStep * BKE_undosys_step_find_by_type(UndoStack *ustack, const UndoType *ut)
#define LISTBASE_FOREACH(type, var, list)
void BLO_memfile_merge(MemFile *first, MemFile *second)
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
ID and Library types, which are fundamental for sdna.
@ LIB_TAG_UNDO_OLD_ID_REUSED
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
#define USER_EXPERIMENTAL_TEST(userdef, member)
bool ED_undo_is_memfile_compatible(const struct bContext *C)
struct UndoStack * ED_undo_stack_get(void)
void ED_editors_init_for_undo(struct Main *bmain)
void ED_editors_exit(struct Main *bmain, bool do_undo_system)
bool ED_editors_flush_edits_ex(struct Main *bmain, bool for_render, bool check_needs_flush)
struct MemFileUndoStep MemFileUndoStep
void ED_undosys_stack_memfile_id_changed_tag(UndoStack *ustack, ID *id)
static struct MemFile * ed_undosys_step_get_memfile(UndoStep *us_p)
static void memfile_undosys_step_free(UndoStep *us_p)
static int memfile_undosys_step_id_reused_cb(LibraryIDLinkCallbackData *cb_data)
struct MemFile * ED_undosys_stack_memfile_get_active(UndoStack *ustack)
static bool memfile_undosys_poll(bContext *C)
static bool memfile_undosys_step_encode(struct bContext *UNUSED(C), struct Main *bmain, UndoStep *us_p)
static void memfile_undosys_step_decode(struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir undo_direction, bool UNUSED(is_final))
void ED_memfile_undosys_type(UndoType *ut)
int recalc_after_undo_push
unsigned int session_uuid
char is_memfile_undo_flush_needed
char use_memfile_full_barrier
struct Collection * master_collection
struct UndoStep * step_active
const struct UndoType * type
void(* step_decode)(struct bContext *C, struct Main *bmain, UndoStep *us, const eUndoStepDir dir, bool is_final)
bool(* step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us)
void(* step_free)(UndoStep *us)
bool(* poll)(struct bContext *C)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)