GPv3: Fix: Assert hit when exiting paint mode

The function `ed_object_mode_generic_exit_ex` was missing
a case for the `OB_MODE_PAINT_GREASE_PENCIL`.
This commit is contained in:
Falk David
2023-08-10 17:44:08 +02:00
parent 7e594b5d96
commit d14289c46a

View File

@@ -312,6 +312,11 @@ static bool ed_object_mode_generic_exit_ex(
}
ED_object_gpencil_exit(bmain, ob);
}
else if (ob->mode & OB_MODE_PAINT_GREASE_PENCIL) {
ob->mode &= ~OB_MODE_PAINT_GREASE_PENCIL;
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
WM_main_add_notifier(NC_SCENE | ND_MODE | NS_MODE_OBJECT, nullptr);
}
else {
if (only_test) {
return false;