Fix T104095: missing crazy space data while sculpting curves

`remember_deformed_curve_positions_if_necessary` has to be called before
topology changing operations on curves. Otherwise the crazy-space data
is invalid.
This commit is contained in:
Jacques Lucke 2023-01-24 14:06:43 +01:00
parent cf332e896f
commit 33edef15ed
Notes: blender-bot 2023-02-14 03:13:26 +01:00
Referenced by issue #104095, Geometry Node: Sculpting hair with Surface Deform caused crashes
2 changed files with 5 additions and 0 deletions

View File

@ -192,6 +192,10 @@ static void node_geo_exec(GeoNodeExecParams params)
const AnonymousAttributePropagationInfo &propagation_info = params.get_output_propagation_info(
"Geometry");
for (GeometrySet &geometry : geometry_sets) {
GeometryComponentEditData::remember_deformed_curve_positions_if_necessary(geometry);
}
GeometrySet geometry_set_result;
join_component_type<MeshComponent>(geometry_sets, geometry_set_result, propagation_info);
join_component_type<PointCloudComponent>(geometry_sets, geometry_set_result, propagation_info);

View File

@ -34,6 +34,7 @@ static void node_geo_exec(GeoNodeExecParams params)
}
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
GeometryComponentEditData::remember_deformed_curve_positions_if_necessary(geometry_set);
geometry::RealizeInstancesOptions options;
options.keep_original_ids = legacy_behavior;
options.realize_instance_attributes = !legacy_behavior;