diff options
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_set_position.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_set_position.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc index eb035aa9b6b..d2ff9753897 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc @@ -7,6 +7,8 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" +#include "BKE_curves.hh" + #include "node_geometry_util.hh" namespace blender::nodes::node_geo_set_position_cc { @@ -62,6 +64,9 @@ static void set_computed_position_and_offset(GeometryComponent &component, break; } case GEO_COMPONENT_TYPE_CURVE: { + CurveComponent &curve_component = static_cast<CurveComponent &>(component); + Curves &curves_id = *curve_component.get_for_write(); + bke::CurvesGeometry &curves = bke::CurvesGeometry::wrap(curves_id.geometry); if (component.attribute_exists("handle_right") && component.attribute_exists("handle_left")) { OutputAttribute_Typed<float3> handle_right_attribute = @@ -90,6 +95,9 @@ static void set_computed_position_and_offset(GeometryComponent &component, handle_right_attribute.save(); handle_left_attribute.save(); + + /* Automatic Bezier handles must be recalculated based on the new positions. */ + curves.calculate_bezier_auto_handles(); break; } else { |