[Bf-blender-cvs] [887ccb85371] master: Fix T96152: Crash realizing curve instances

Hans Goudey noreply at git.blender.org
Sat Mar 5 04:29:05 CET 2022


Commit: 887ccb853711d89a67d77fa1037cd977298780b3
Author: Hans Goudey
Date:   Fri Mar 4 22:28:57 2022 -0500
Branches: master
https://developer.blender.org/rB887ccb853711d89a67d77fa1037cd977298780b3

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 9ec12c26f16ea3da1e6de95d5.
`curve_type` needs to be marked as a built-in attribute.

===================================================================

M	source/blender/blenkernel/intern/geometry_component_curves.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc
index 5723d110aa0..86cbea9a9bb 100644
--- a/source/blender/blenkernel/intern/geometry_component_curves.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curves.cc
@@ -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});



More information about the Bf-blender-cvs mailing list