Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-09-26 12:09:49 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-09-30 15:36:15 +0300
commitb266eedb24216d12e7057aaaf983ae71d30d6ed7 (patch)
tree78ac9d1509f072dbf230824833b57f880a1af208 /source
parent803d9f974876303e3c6c4a32743589c2efe10127 (diff)
Fix T101370: GPencil Grab Sculpt crash after bake transform animation
The problem was the duplicated strokes had wrong pointers to the original stroke.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/gpencil/gpencil_bake_animation.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_bake_animation.cc b/source/blender/editors/gpencil/gpencil_bake_animation.cc
index e480852a9bb..976f142f295 100644
--- a/source/blender/editors/gpencil/gpencil_bake_animation.cc
+++ b/source/blender/editors/gpencil/gpencil_bake_animation.cc
@@ -298,6 +298,7 @@ static int gpencil_bake_grease_pencil_animation_exec(bContext *C, wmOperator *op
BLI_addtail(&gpl_dst->frames, gpf_dst);
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf_dst->strokes) {
+ gps->runtime.gps_orig = NULL;
/* Create material of the stroke. */
Material *ma_src = BKE_object_material_get(elem->ob, gps->mat_nr + 1);
bool found = false;
@@ -320,6 +321,8 @@ static int gpencil_bake_grease_pencil_animation_exec(bContext *C, wmOperator *op
/* Update point location to new object space. */
for (int j = 0; j < gps->totpoints; j++) {
bGPDspoint *pt = &gps->points[j];
+ pt->runtime.idx_orig = 0;
+ pt->runtime.pt_orig = NULL;
mul_m4_v3(ob_eval->obmat, &pt->x);
mul_m4_v3(invmat, &pt->x);
}