From c990cd6759b6ef69dfdccefb3b1f2be786045924 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 17 Oct 2025 14:40:43 +0200 Subject: [PATCH] Fix: correct previous commit This is an alternative to ba0f73d0760ae9a. I'm not exactly sure why that on didn't work yet. Seems like there is some hidden state somewhere, not sure. Now this fix is more similar to what is done in `curves_blend_write`. Pull Request: https://projects.blender.org/blender/blender/pulls/148267 --- source/blender/blenkernel/intern/grease_pencil.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/grease_pencil.cc b/source/blender/blenkernel/intern/grease_pencil.cc index 55f7e41182e..7167a62a9cc 100644 --- a/source/blender/blenkernel/intern/grease_pencil.cc +++ b/source/blender/blenkernel/intern/grease_pencil.cc @@ -4416,8 +4416,11 @@ static void write_drawing_array(GreasePencil &grease_pencil, curves.blend_write_prepare(write_data); drawing_copy.runtime = nullptr; - curves.blend_write(*writer, grease_pencil.id, write_data); + BLO_write_shared_tag(writer, curves.curve_offsets); + BLO_write_shared_tag(writer, curves.custom_knots); + BLO_write_struct_at_address(writer, GreasePencilDrawing, drawing_base, &drawing_copy); + curves.blend_write(*writer, grease_pencil.id, write_data); break; } case GP_DRAWING_REFERENCE: {