From 0e44c5d851044dd9e41de0a7198ef0e26dd38833 Mon Sep 17 00:00:00 2001 From: Casey Bianco-Davis Date: Mon, 13 Oct 2025 18:13:58 +0200 Subject: [PATCH] Fix #147432: Grease Pencil: Pen tool Assert when Resolution attribute exists The problem was that the Pen Tool would not set the `Resolution` attribute and so when the `Resolution` attribute didn't exist, the newly added curve would default to a value of 0, which would then lead to an Assert. This problem would also effect `Curves` Objects. Pull Request: https://projects.blender.org/blender/blender/pulls/147673 --- source/blender/editors/curves/intern/curves_pen.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/editors/curves/intern/curves_pen.cc b/source/blender/editors/curves/intern/curves_pen.cc index adcb04406f0..188a8bbd4aa 100644 --- a/source/blender/editors/curves/intern/curves_pen.cc +++ b/source/blender/editors/curves/intern/curves_pen.cc @@ -813,6 +813,8 @@ static void add_single_point_and_curve(const PenToolOperation &ptd, curves.handle_types_left_for_write().last() = ptd.extrude_handle; curves.handle_types_right_for_write().last() = ptd.extrude_handle; curves.update_curve_types(); + curves.resolution_for_write().last() = 12; + curve_attributes_to_skip.add("resolution"); const int material_index = ptd.vc.obact->actcol - 1; if (material_index != -1) {