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.
This commit is contained in:
parent
baf69b064b
commit
190d66b51e
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue