32 #include "../depsgraph/DEG_depsgraph.h"
42 #include "../blenloader/BLO_undofile.h"
106 ID *
id = *id_pointer;
108 bool do_stop_iter =
true;
112 if (ob_self->
data ==
id) {
122 do_stop_iter =
false;
167 bool use_old_bmain_data =
true;
170 use_old_bmain_data =
false;
178 use_old_bmain_data =
false;
190 if (us_next !=
NULL) {
192 use_old_bmain_data =
false;
200 if (use_old_bmain_data) {
216 us_iter->is_applied =
false;
218 for (
UndoStep *us_iter = us_p; us_iter; us_iter = us_iter->
prev) {
222 us_iter->is_applied =
true;
229 if (use_old_bmain_data) {
272 id->recalc_after_undo_push = 0;
274 if (nodetree !=
NULL) {
305 if (us_next_p !=
NULL) {
316 ut->
name =
"Global Undo";
362 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, enum eUndoStepDir undo_direction, bool use_old_bmain_data, struct bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct PreviewImage * BKE_previewimg_id_get(const struct ID *id)
bool BKE_previewimg_is_finished(const struct PreviewImage *prv, int size)
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.
#define ID_IS_LINKED(_id)
@ 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)
void ED_preview_restart_queue_add(struct ID *id, enum eIconSizes size)
void ED_preview_kill_jobs(struct wmWindowManager *wm, struct Main *bmain)
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)
static void memfile_undosys_unfinished_id_previews_restart(ID *id)
static const pxr::TfToken preview("preview", pxr::TfToken::Immortal)
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, 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)