Fix #124484: Debug assert on undoing out of Sculpt Mode #124640
@ -911,6 +911,12 @@ static void restore_list(bContext *C, Depsgraph *depsgraph, StepData &step_data)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Switching to sculpt mode does not push a particular type.
|
||||
* See #124484. */
|
||||
if (step_data.type == Type::None && step_data.nodes.is_empty()) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const bool tag_update = ID_REAL_USERS(object.data) > 1 ||
|
||||
!BKE_sculptsession_use_pbvh_draw(&object, rv3d) || ss.shapekey_active ||
|
||||
ss.deform_modifiers_active;
|
||||
|
Loading…
Reference in New Issue
Block a user
Wouldn't it be more fitting to move this as
BLI_assert(step_data.nodes.is_empty())
into the switch statement below?I think that's an option, certainly. To me this case seemed to be something we should explicitly handle instead of conditionally asserting based on the state of the node data. I don't have a particularly strong opinion here though.
I also don't really have strong opinion. For the simplicity can just go with the current version of the patch.