[Bf-blender-cvs] [190d66b51e4] master: Cleanup: Remove unused attribute API function

Hans Goudey noreply at git.blender.org
Thu Jan 19 22:40:14 CET 2023


Commit: 190d66b51e4db98d7e9dc69e01c972b7da498e40
Author: Hans Goudey
Date:   Thu Jan 19 15:37:36 2023 -0600
Branches: master
https://developer.blender.org/rB190d66b51e4db98d7e9dc69e01c972b7da498e40

Cleanup: Remove unused attribute API function

While we do need higher level utilities for copying attributes
between geometries, this currently isn't used and it's not clear
that it will be the right abstraction in the end.

===================================================================

M	source/blender/blenkernel/BKE_attribute.hh
M	source/blender/blenkernel/intern/attribute_access.cc

===================================================================

diff --git a/source/blender/blenkernel/BKE_attribute.hh b/source/blender/blenkernel/BKE_attribute.hh
index 0ff120328d3..afa9f1fba23 100644
--- a/source/blender/blenkernel/BKE_attribute.hh
+++ b/source/blender/blenkernel/BKE_attribute.hh
@@ -753,20 +753,6 @@ Vector<AttributeTransferData> retrieve_attributes_for_transfer(
     const AnonymousAttributePropagationInfo &propagation_info,
     const Set<std::string> &skip = {});
 
-/**
- * Copy attributes for the domain based on the elementwise mask.
- *
- * \param mask_indices: Indexed elements to copy from the source data-block.
- * \param domain: Attribute domain to transfer.
- * \param skip: Named attributes to ignore/skip.
- */
-void copy_attribute_domain(AttributeAccessor src_attributes,
-                           MutableAttributeAccessor dst_attributes,
-                           IndexMask selection,
-                           eAttrDomain domain,
-                           const AnonymousAttributePropagationInfo &propagation_info,
-                           const Set<std::string> &skip = {});
-
 bool allow_procedural_attribute_access(StringRef attribute_name);
 extern const char *no_procedural_access_message;
 
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index 92bb7247673..8a6e1486701 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -913,38 +913,6 @@ Vector<AttributeTransferData> retrieve_attributes_for_transfer(
   return attributes;
 }
 
-void copy_attribute_domain(const AttributeAccessor src_attributes,
-                           MutableAttributeAccessor dst_attributes,
-                           const IndexMask selection,
-                           const eAttrDomain domain,
-                           const AnonymousAttributePropagationInfo &propagation_info,
-                           const Set<std::string> &skip)
-{
-  src_attributes.for_all(
-      [&](const bke::AttributeIDRef &id, const bke::AttributeMetaData &meta_data) {
-        if (meta_data.domain != domain) {
-          return true;
-        }
-        if (id.is_anonymous() && !propagation_info.propagate(id.anonymous_id())) {
-          return true;
-        }
-        if (skip.contains(id.name())) {
-          return true;
-        }
-
-        const GVArray src = src_attributes.lookup(id, meta_data.domain);
-        BLI_assert(src);
-
-        /* Copy attribute. */
-        GSpanAttributeWriter dst = dst_attributes.lookup_or_add_for_write_only_span(
-            id, domain, meta_data.data_type);
-        array_utils::copy(src, selection, dst.span);
-        dst.finish();
-
-        return true;
-      });
-}
-
 }  // namespace blender::bke
 
 /** \} */



More information about the Bf-blender-cvs mailing list