Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-04-07 00:30:27 +0300
committerHans Goudey <h.goudey@me.com>2022-04-07 00:30:27 +0300
commit8551e890687de7185388eed9e77171b0df7943a3 (patch)
tree7833056784792f3a46ac8fb6bd9776f3ced33367 /source/blender/blenkernel/intern/curve_eval.cc
parent8b04308953adae983562026a2aa7bbd38e74174d (diff)
Curves: Name mutable data retrieval functions explicitly
Add "for_write" on function names that retrieve mutable data arrays. Though this makes function names longer, it's likely worth it because it allows more easily using the const functions in a non-const context, and reduces cases of mistakenly retrieving with edit access. In the long term, this situation might change more if we implement attributes storage that is accessible directly on `CurvesGeometry` without duplicating the attribute API on geometry components, which is currently the rough plan. Differential Revision: https://developer.blender.org/D14562
Diffstat (limited to 'source/blender/blenkernel/intern/curve_eval.cc')
-rw-r--r--source/blender/blenkernel/intern/curve_eval.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc
index 2cf83b57881..7761b7acc49 100644
--- a/source/blender/blenkernel/intern/curve_eval.cc
+++ b/source/blender/blenkernel/intern/curve_eval.cc
@@ -462,8 +462,8 @@ Curves *curve_eval_to_curves(const CurveEval &curve_eval)
dst_component.replace(curves, GeometryOwnershipType::Editable);
blender::bke::CurvesGeometry &geometry = blender::bke::CurvesGeometry::wrap(curves->geometry);
- geometry.offsets().copy_from(curve_eval.control_point_offsets());
- MutableSpan<int8_t> curve_types = geometry.curve_types();
+ geometry.offsets_for_write().copy_from(curve_eval.control_point_offsets());
+ MutableSpan<int8_t> curve_types = geometry.curve_types_for_write();
OutputAttribute_Typed<float> nurbs_weight;
OutputAttribute_Typed<int> nurbs_order;