104 ID *
id = *id_pointer;
106 bool do_stop_iter =
true;
110 if (ob_self->
data ==
id) {
112 if (ob_self->
pose !=
nullptr) {
120 do_stop_iter =
false;
162 bool use_old_bmain_data =
true;
165 use_old_bmain_data =
false;
173 use_old_bmain_data =
false;
185 if (us_next !=
nullptr) {
187 use_old_bmain_data =
false;
194 GHash *depsgraphs =
nullptr;
195 if (use_old_bmain_data) {
207 for (
UndoStep *us_iter = us_p->
next; us_iter; us_iter = us_iter->next) {
211 us_iter->is_applied =
false;
213 for (
UndoStep *us_iter = us_p; us_iter; us_iter = us_iter->
prev) {
217 us_iter->is_applied =
true;
224 if (use_old_bmain_data) {
246 if (recalc_flags != 0) {
251 if (nodetree !=
nullptr) {
256 if (recalc_flags != 0) {
262 if (scene->master_collection !=
nullptr) {
267 if (recalc_flags != 0) {
286 id->recalc_after_undo_push = 0;
288 if (nodetree !=
nullptr) {
293 if (scene->master_collection !=
nullptr) {
317 if (us_p->
next !=
nullptr) {
319 if (us_next_p !=
nullptr) {
330 ut->
name =
"Global Undo";
377 if (mem_chunk->id_session_uid == id->session_uid) {
378 mem_chunk->is_identical_future =
false;
bool BKE_memfile_undo_decode(MemFileUndoData *mfu, eUndoStepDir undo_direction, bool use_old_bmain_data, bContext *C)
MemFileUndoData * BKE_memfile_undo_encode(Main *bmain, MemFileUndoData *mfu_prev)
void BKE_memfile_undo_free(MemFileUndoData *mfu)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_library_foreach_ID_link(Main *bmain, ID *id, blender::FunctionRef< LibraryIDLinkCallback > callback, void *user_data, int flag)
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
PreviewImage * BKE_previewimg_id_get(const ID *id)
bool BKE_previewimg_is_finished(const PreviewImage *prv, int size)
void BKE_scene_undo_depsgraphs_restore(Main *bmain, GHash *depsgraph_extract)
GHash * BKE_scene_undo_depsgraphs_extract(Main *bmain)
UndoStep * BKE_undosys_step_find_by_type(UndoStack *ustack, const UndoType *ut)
UndoStep * BKE_undosys_step_same_type_next(UndoStep *us)
const UndoType * BKE_UNDOSYS_TYPE_MEMFILE
#define BKE_UNDOSYS_TYPE_IS_MEMFILE_SKIP(ty)
#define LISTBASE_FOREACH(type, var, list)
void BLO_memfile_merge(MemFile *first, MemFile *second)
void DEG_id_tag_update_ex(Main *bmain, ID *id, unsigned int flags)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_LINKED(_id)
@ ID_TAG_UNDO_OLD_ID_REUSED_UNCHANGED
@ ID_TAG_UNDO_OLD_ID_REUSED_NOUNDO
@ ID_TAG_UNDO_OLD_ID_REREAD_IN_PLACE
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(ID *id, enum eIconSizes size)
void ED_preview_kill_jobs(wmWindowManager *wm, Main *bmain)
UndoStack * ED_undo_stack_get()
bool ED_undo_is_memfile_compatible(const bContext *C)
void ED_editors_exit(Main *bmain, bool do_undo_system)
void ED_editors_init_for_undo(Main *bmain)
bool ED_editors_flush_edits_ex(Main *bmain, bool for_render, bool check_needs_flush)
static MemFile * ed_undosys_step_get_memfile(UndoStep *us_p)
void ED_undosys_stack_memfile_id_changed_tag(UndoStack *ustack, ID *id)
static void memfile_undosys_step_free(UndoStep *us_p)
MemFile * ED_undosys_stack_memfile_get_if_active(UndoStack *ustack)
static int memfile_undosys_step_id_reused_cb(LibraryIDLinkCallbackData *cb_data)
static void memfile_undosys_step_decode(bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir undo_direction, bool)
static bool memfile_undosys_poll(bContext *C)
static bool memfile_undosys_step_encode(bContext *, Main *bmain, UndoStep *us_p)
void ED_memfile_undosys_type(UndoType *ut)
static void memfile_undosys_unfinished_id_previews_restart(ID *id)
bNodeTree * node_tree_from_id(ID *id)
unsigned int recalc_after_undo_push
bool is_memfile_undo_flush_needed
bool use_memfile_full_barrier
struct Collection * master_collection
void(* step_free)(UndoStep *us)
bool(* poll)(struct bContext *C)
void(* step_decode)(bContext *C, Main *bmain, UndoStep *us, eUndoStepDir dir, bool is_final)
bool(* step_encode)(bContext *C, Main *bmain, UndoStep *us)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)