diff options
author | Hans Goudey <h.goudey@me.com> | 2021-10-18 18:08:57 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-10-18 18:08:57 +0300 |
commit | 3cbe9218994aec59e417a595b9a1f7256108e693 (patch) | |
tree | d1993cafbe00ef0968454c6c9f61c24254172483 /source/blender/blenkernel/intern/attribute_access_intern.hh | |
parent | aef8ac7db830a47950ca4115eff5d0d72a4d6fcf (diff) |
Cleanup: Use simpler method to create attribute lookups
Instead of switch statements, make use of generic virtual arrays
so the code is shorter and easier to read.
Differential Revision: https://developer.blender.org/D12908
Diffstat (limited to 'source/blender/blenkernel/intern/attribute_access_intern.hh')
-rw-r--r-- | source/blender/blenkernel/intern/attribute_access_intern.hh | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/attribute_access_intern.hh b/source/blender/blenkernel/intern/attribute_access_intern.hh index 261cb26d4e5..6e5cdd6faba 100644 --- a/source/blender/blenkernel/intern/attribute_access_intern.hh +++ b/source/blender/blenkernel/intern/attribute_access_intern.hh @@ -177,24 +177,6 @@ class CustomDataAttributeProvider final : public DynamicAttributesProvider { } private: - template<typename T> - ReadAttributeLookup layer_to_read_attribute(const CustomDataLayer &layer, - const int domain_size) const - { - return {std::make_unique<fn::GVArray_For_Span<T>>( - Span(static_cast<const T *>(layer.data), domain_size)), - domain_}; - } - - template<typename T> - WriteAttributeLookup layer_to_write_attribute(CustomDataLayer &layer, - const int domain_size) const - { - return {std::make_unique<fn::GVMutableArray_For_MutableSpan<T>>( - MutableSpan(static_cast<T *>(layer.data), domain_size)), - domain_}; - } - bool type_is_supported(CustomDataType data_type) const { return ((1ULL << data_type) & supported_types_mask) != 0; |