From 017c8742cb8bbfbb65cb16eacd36701f8ecf90e0 Mon Sep 17 00:00:00 2001 From: Falk David Date: Mon, 29 Jul 2024 15:17:38 +0200 Subject: [PATCH] Fix: GPv3: Crash in realize instances node This was reported by the studio. When opening one of the lighting files in 4.3, Blender would crash. The realize instance task for grease pencil needs to copy all the layer attributes to the target geometry. When creating the `dst_attribute_writers` using `lookup_or_add_for_write_only_span` the `bke::AttrDomain::Point` was used when it should have been `bke::AttrDomain::Layer`. Pull Request: https://projects.blender.org/blender/blender/pulls/125603 --- source/blender/geometry/intern/realize_instances.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc index f01d9379128..ae959e69d0c 100644 --- a/source/blender/geometry/intern/realize_instances.cc +++ b/source/blender/geometry/intern/realize_instances.cc @@ -2119,7 +2119,7 @@ static void execute_realize_grease_pencil_tasks( const AttributeIDRef &attribute_id = ordered_attributes.ids[attribute_index]; const eCustomDataType data_type = ordered_attributes.kinds[attribute_index].data_type; dst_attribute_writers.append(dst_attributes.lookup_or_add_for_write_only_span( - attribute_id, bke::AttrDomain::Point, data_type)); + attribute_id, bke::AttrDomain::Layer, data_type)); } /* Actually execute all tasks. */