Fix T96152: Crash realizing curve instances

The "curve_type" was transferred to instances because it isn't a
built-in curve attribute. Then it was interpolated as a point
domain attribute from the instance domain in the realize
instances node.

The fix was just missing from 9ec12c26f1.
`curve_type` needs to be marked as a built-in attribute.
This commit is contained in:
Hans Goudey 2022-03-04 22:28:57 -05:00
parent 295d5c6ef5
commit 887ccb8537
Notes: blender-bot 2024-01-16 18:05:25 +01:00
Referenced by issue #96242, CRASH: conecting spline length to resample curve
Referenced by issue #96199, GNodes: realized curve instances disappear
Referenced by issue #96152, Geometry Node Causing Blender Crash
1 changed files with 13 additions and 0 deletions

View File

@ -467,6 +467,18 @@ static ComponentAttributeProviders create_attribute_providers_for_curve()
make_array_write_attribute<int8_t>,
tag_component_topology_changed);
static BuiltinCustomDataLayerProvider curve_type("curve_type",
ATTR_DOMAIN_CURVE,
CD_PROP_INT8,
CD_PROP_INT8,
BuiltinAttributeProvider::Creatable,
BuiltinAttributeProvider::Writable,
BuiltinAttributeProvider::Deletable,
curve_access,
make_array_read_attribute<int8_t>,
make_array_write_attribute<int8_t>,
tag_component_topology_changed);
static BuiltinCustomDataLayerProvider resolution("resolution",
ATTR_DOMAIN_CURVE,
CD_PROP_INT32,
@ -504,6 +516,7 @@ static ComponentAttributeProviders create_attribute_providers_for_curve()
&handle_type_left,
&nurbs_order,
&nurbs_weight,
&curve_type,
&resolution,
&cyclic},
{&curve_custom_data, &point_custom_data});