diff options
Diffstat (limited to 'source/blender/geometry')
-rw-r--r-- | source/blender/geometry/intern/mesh_to_curve_convert.cc | 10 | ||||
-rw-r--r-- | source/blender/geometry/intern/realize_instances.cc | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/geometry/intern/mesh_to_curve_convert.cc b/source/blender/geometry/intern/mesh_to_curve_convert.cc index 5ba9bc066fd..a8eaa828caf 100644 --- a/source/blender/geometry/intern/mesh_to_curve_convert.cc +++ b/source/blender/geometry/intern/mesh_to_curve_convert.cc @@ -36,12 +36,12 @@ static Curves *create_curve_from_vert_indices(const MeshComponent &mesh_componen { Curves *curves_id = bke::curves_new_nomain(vert_indices.size(), curve_offsets.size()); bke::CurvesGeometry &curves = bke::CurvesGeometry::wrap(curves_id->geometry); - curves.offsets().drop_back(1).copy_from(curve_offsets); - curves.offsets().last() = vert_indices.size(); - curves.curve_types().fill(CURVE_TYPE_POLY); + curves.offsets_for_write().drop_back(1).copy_from(curve_offsets); + curves.offsets_for_write().last() = vert_indices.size(); + curves.curve_types_for_write().fill(CURVE_TYPE_POLY); - curves.cyclic().fill(false); - curves.cyclic().slice(cyclic_curves).fill(true); + curves.cyclic_for_write().fill(false); + curves.cyclic_for_write().slice(cyclic_curves).fill(true); Set<bke::AttributeIDRef> source_attribute_ids = mesh_component.attribute_ids(); diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc index 623bce35a15..0a0f01c1ff2 100644 --- a/source/blender/geometry/intern/realize_instances.cc +++ b/source/blender/geometry/intern/realize_instances.cc @@ -1143,7 +1143,7 @@ static void execute_realize_curve_task(const RealizeInstancesOptions &options, const IndexRange dst_curve_range{task.start_indices.curve, curves.curves_num()}; copy_transformed_positions( - curves.positions(), task.transform, dst_curves.positions().slice(dst_point_range)); + curves.positions(), task.transform, dst_curves.positions_for_write().slice(dst_point_range)); /* Copy and transform handle positions if necessary. */ if (all_curves_info.create_handle_postion_attributes) { @@ -1175,7 +1175,7 @@ static void execute_realize_curve_task(const RealizeInstancesOptions &options, /* Copy curve offsets. */ const Span<int> src_offsets = curves.offsets(); - const MutableSpan<int> dst_offsets = dst_curves.offsets().slice(dst_curve_range); + const MutableSpan<int> dst_offsets = dst_curves.offsets_for_write().slice(dst_curve_range); threading::parallel_for(curves.curves_range(), 2048, [&](const IndexRange range) { for (const int i : range) { dst_offsets[i] = task.start_indices.point + src_offsets[i]; @@ -1223,7 +1223,7 @@ static void execute_realize_curve_tasks(const RealizeInstancesOptions &options, /* Allocate new curves data-block. */ Curves *dst_curves_id = bke::curves_new_nomain(points_size, curves_size); bke::CurvesGeometry &dst_curves = bke::CurvesGeometry::wrap(dst_curves_id->geometry); - dst_curves.offsets().last() = points_size; + dst_curves.offsets_for_write().last() = points_size; CurveComponent &dst_component = r_realized_geometry.get_component_for_write<CurveComponent>(); dst_component.replace(dst_curves_id); |