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
path: root/source
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-10-18 20:35:27 +0300
committerHans Goudey <h.goudey@me.com>2021-10-18 20:35:27 +0300
commitec8a9a0d6586d01b144ce4168e0f57d29ef7f738 (patch)
treed4ae5282fc9e649bb323fb463d619c1161852ffd /source
parent9f895fbb9708eaa1d70abcd3091d44f262380a8a (diff)
Cleanup: Remove unnecessary constructor argument
All attributes should be writeable, it is now only needed for the legacy `normal` attribute on meshes.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curve.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 8923521d699..50c0f06b12c 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -980,16 +980,15 @@ template<typename T> class BuiltinPointAttributeProvider : public BuiltinAttribu
public:
BuiltinPointAttributeProvider(std::string attribute_name,
- const WritableEnum writable,
const GetSpan get_span,
const GetMutableSpan get_mutable_span,
const UpdateOnWrite update_on_write)
: BuiltinAttributeProvider(std::move(attribute_name),
ATTR_DOMAIN_POINT,
bke::cpp_type_to_custom_data_type(CPPType::get<T>()),
- BuiltinAttributeProvider::NonCreatable,
- writable,
- BuiltinAttributeProvider::NonDeletable),
+ CreatableEnum::NonCreatable,
+ WritableEnum::Writable,
+ DeletableEnum::NonDeletable),
get_span_(get_span),
get_mutable_span_(get_mutable_span),
update_on_write_(update_on_write)
@@ -1091,7 +1090,6 @@ class PositionAttributeProvider final : public BuiltinPointAttributeProvider<flo
PositionAttributeProvider()
: BuiltinPointAttributeProvider(
"position",
- BuiltinAttributeProvider::Writable,
[](const Spline &spline) { return spline.positions(); },
[](Spline &spline) { return spline.positions(); },
[](Spline &spline) { spline.mark_cache_invalid(); })
@@ -1491,14 +1489,12 @@ static ComponentAttributeProviders create_attribute_providers_for_curve()
static BuiltinPointAttributeProvider<float> radius(
"radius",
- BuiltinAttributeProvider::Writable,
[](const Spline &spline) { return spline.radii(); },
[](Spline &spline) { return spline.radii(); },
nullptr);
static BuiltinPointAttributeProvider<float> tilt(
"tilt",
- BuiltinAttributeProvider::Writable,
[](const Spline &spline) { return spline.tilts(); },
[](Spline &spline) { return spline.tilts(); },
[](Spline &spline) { spline.mark_cache_invalid(); });