From c98da9d971c391d035fccaefb64adbef52e672a8 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 18 Oct 2024 16:47:23 -0400 Subject: [PATCH] Fix #128656: Dynamic topology undo bugs when mixing memfile undo Caused by 889b1429245e382d4194673d73c92a626ce3484f which added the early return for the BMesh case. --- source/blender/editors/sculpt_paint/sculpt_undo.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.cc b/source/blender/editors/sculpt_paint/sculpt_undo.cc index 26c81de4137..2a29e2028a7 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.cc +++ b/source/blender/editors/sculpt_paint/sculpt_undo.cc @@ -1504,6 +1504,9 @@ void push_nodes(const Depsgraph &depsgraph, const Type type) { SculptSession &ss = *object.sculpt; + + ss.needs_flush_to_id = 1; + const bke::pbvh::Tree &pbvh = *bke::object::pbvh_get(object); if (ss.bm || ELEM(type, Type::DyntopoBegin, Type::DyntopoEnd)) { const Span nodes = pbvh.nodes(); @@ -1555,8 +1558,6 @@ void push_nodes(const Depsgraph &depsgraph, break; } } - - ss.needs_flush_to_id = 1; } static void save_active_attribute(Object &object, SculptAttrRef *attr)