From 79b703bb635ea719bbe31c1ece9884d2d298eaef Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 7 Nov 2019 16:52:03 +1100 Subject: Fix T69822: Switching sculpt objects breaks undo This introduces object mode tagging for data which hasn't yet been written back to the ID data. Now when selecting other sculpt objects, the original objects data is flushed back to the ID before writing a memfile undo step. --- source/blender/blenkernel/BKE_main.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/BKE_main.h') diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 1b2e8bcbf42..c48a9cad443 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -80,6 +80,11 @@ typedef struct Main { char recovered; /* indicate the main->name (file) is the recovered one */ /** All current ID's exist in the last memfile undo step. */ char is_memfile_undo_written; + /** + * An ID needs it's data to be flushed back. + * use "needs_flush_to_id" in edit data to flag data which needs updating. + */ + char is_memfile_undo_flush_needed; BlendThumbnail *blen_thumb; -- cgit v1.2.3