From 05d6818aa25c2ed8948526e090eefcdc2a57014d Mon Sep 17 00:00:00 2001 From: Falk David Date: Thu, 2 Nov 2023 17:08:36 +0100 Subject: [PATCH] Fix #110038: Crash when sculpting on GP object with modifier When trying to sculpt a Grease Pencil object with a line art modifier (other modifiers probably also casue issues), Blender would crash. I wasn't able to track down the exact issue but it's related to how the update-cache stores pointers to original data. This reverts part of e2befa425a to not make use of the update cache while sculpting. Combined with modifiers, this approach is just too unstable right now. Pull Request: https://projects.blender.org/blender/blender/pulls/114410 --- .../blender/editors/gpencil_legacy/gpencil_sculpt_paint.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.cc b/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.cc index f88ff0930ef..456bd592e78 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.cc @@ -304,7 +304,6 @@ static void gpencil_update_geometry(bGPdata *gpd) LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { if (gps->flag & GP_STROKE_TAG) { BKE_gpencil_stroke_geometry_update(gpd, gps); - BKE_gpencil_tag_full_update(gpd, gpl, gpf, gps); gps->flag &= ~GP_STROKE_TAG; changed = true; } @@ -1389,7 +1388,6 @@ static void gpencil_sculpt_brush_init_stroke(bContext *C, tGP_BrushEditData *gso */ if (IS_AUTOKEY_ON(scene) && (gpf->framenum != cfra)) { BKE_gpencil_frame_addcopy(gpl, cfra); - BKE_gpencil_tag_full_update(gpd, gpl, nullptr, nullptr); /* Need tag to recalculate evaluated data to avoid crashes. */ DEG_id_tag_update(&gso->gpd->id, ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, nullptr); @@ -1760,9 +1758,6 @@ static bool gpencil_sculpt_brush_do_frame(bContext *C, /* Delay a full recalculation for other frames. */ gpencil_recalc_geometry_tag(gps_active); } - bGPDlayer *gpl_active = (gpl->runtime.gpl_orig) ? gpl->runtime.gpl_orig : gpl; - bGPDframe *gpf_active = (gpf->runtime.gpf_orig) ? gpf->runtime.gpf_orig : gpf; - BKE_gpencil_tag_full_update(gpd, gpl_active, gpf_active, gps_active); } }