diff options
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc | 1 | ||||
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc index ba7985f26bc..bb31d9c1a57 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc @@ -309,6 +309,7 @@ class SampleCurveFunction : public fn::MultiFunction { if (curves.points_num() == 0) { return return_default(); } + curves.ensure_can_interpolate_to_evaluated(); Span<float3> evaluated_positions = curves.evaluated_positions(); Span<float3> evaluated_tangents; Span<float3> evaluated_normals; diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc index d46ceac92ba..dcd910b8ad2 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc @@ -24,11 +24,13 @@ static void set_resolution(bke::CurvesGeometry &curves, MutableAttributeAccessor attributes = curves.attributes_for_write(); AttributeWriter<int> resolutions = attributes.lookup_or_add_for_write<int>("resolution", ATTR_DOMAIN_CURVE); + bke::AttributeValidator validator = attributes.lookup_validator("resolution"); bke::CurvesFieldContext field_context{curves, ATTR_DOMAIN_CURVE}; fn::FieldEvaluator evaluator{field_context, curves.curves_num()}; evaluator.set_selection(selection_field); - evaluator.add_with_destination(resolution_field, resolutions.varray); + evaluator.add_with_destination(validator.validate_field_if_necessary(resolution_field), + resolutions.varray); evaluator.evaluate(); resolutions.finish(); |