[Bf-blender-cvs] [1fcc673230b] master: Cleanup: Remove unused function
Hans Goudey
noreply at git.blender.org
Mon Sep 5 22:48:58 CEST 2022
Commit: 1fcc673230bf585b2b0239d4476b94523bd0ec21
Author: Hans Goudey
Date: Mon Sep 5 15:48:36 2022 -0500
Branches: master
https://developer.blender.org/rB1fcc673230bf585b2b0239d4476b94523bd0ec21
Cleanup: Remove unused function
This had a specific use case relating to the `CurveEval` type
which shouldn't be necessary anymore.
===================================================================
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 6284cce9dc0..83e1a3208ae 100644
--- a/source/blender/blenkernel/BKE_attribute.hh
+++ b/source/blender/blenkernel/BKE_attribute.hh
@@ -752,11 +752,6 @@ class CustomDataAttributes {
bool create_by_move(const AttributeIDRef &attribute_id, eCustomDataType data_type, void *buffer);
bool remove(const AttributeIDRef &attribute_id);
- /**
- * Change the order of the attributes to match the order of IDs in the argument.
- */
- void reorder(Span<AttributeIDRef> new_order);
-
bool foreach_attribute(const AttributeForeachCallback callback, eAttrDomain domain) const;
};
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index 0187dbd6f78..e39c6d11fa9 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -784,26 +784,6 @@ bool CustomDataAttributes::foreach_attribute(const AttributeForeachCallback call
return true;
}
-void CustomDataAttributes::reorder(Span<AttributeIDRef> new_order)
-{
- BLI_assert(new_order.size() == data.totlayer);
-
- Map<AttributeIDRef, int> old_order;
- old_order.reserve(data.totlayer);
- Array<CustomDataLayer> old_layers(Span(data.layers, data.totlayer));
- for (const int i : old_layers.index_range()) {
- old_order.add_new(attribute_id_from_custom_data_layer(old_layers[i]), i);
- }
-
- MutableSpan layers(data.layers, data.totlayer);
- for (const int i : layers.index_range()) {
- const int old_index = old_order.lookup(new_order[i]);
- layers[i] = old_layers[old_index];
- }
-
- CustomData_update_typemap(&data);
-}
-
/* -------------------------------------------------------------------- */
/** \name Attribute API
* \{ */
More information about the Bf-blender-cvs
mailing list