From 7e9a48eb98c818880e99d2e97fffe4924099493c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 19 Dec 2024 22:45:46 +0100 Subject: [PATCH] Cleanup: ATTR_RADIUS unused warning with clang --- source/blender/blenkernel/BKE_curves.hh | 3 +++ source/blender/blenkernel/intern/curves_geometry.cc | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 20fdecb1910..6c6c6e18f10 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -214,6 +214,9 @@ class CurvesGeometry : public ::CurvesGeometry { Span positions() const; MutableSpan positions_for_write(); + VArray radius() const; + MutableSpan radius_for_write(); + /** Whether the curve loops around to connect to itself, on the curve domain. */ VArray cyclic() const; /** Mutable access to curve cyclic values. Call #tag_topology_changed after changes. */ diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc index 86d86dc8b7b..04ff0fb262d 100644 --- a/source/blender/blenkernel/intern/curves_geometry.cc +++ b/source/blender/blenkernel/intern/curves_geometry.cc @@ -359,6 +359,15 @@ MutableSpan CurvesGeometry::positions_for_write() return get_mutable_attribute(*this, AttrDomain::Point, ATTR_POSITION); } +VArray CurvesGeometry::radius() const +{ + return get_varray_attribute(*this, AttrDomain::Point, ATTR_RADIUS, 0.01f); +} +MutableSpan CurvesGeometry::radius_for_write() +{ + return get_mutable_attribute(*this, AttrDomain::Point, ATTR_RADIUS); +} + Span CurvesGeometry::offsets() const { if (this->curve_num == 0) {