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
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-07-20 02:50:27 +0300
committerHans Goudey <h.goudey@me.com>2022-07-20 02:50:27 +0300
commit2551cf908732bab2865654571164d74e8bbad47e (patch)
tree3f526721dce7aa3e0304decd2fa1c23d65e64c87 /source/blender/blenkernel/BKE_attribute.hh
parent5d6e4822d85bf4db099e2810555af17962929e49 (diff)
Curves: Port fillet node to the new data-block
This commit ports the fillet curves node to the new curves data-block, and moves the fillet node implementation to the geometry module to help separate the implementation from the node. The changes are similar to the subdivide node or resample node. I've resused common utilities where it makes sense, though some things like the iteration over attributes can be generalized further. The node is now multi-threaded per-curve and inside each curve, and some buffers are reused per curve to avoid many allocations. The code is more explicit now, and though there is more boilerplate to pass around many spans, the more complex logic should be more readable. Differential Revision: https://developer.blender.org/D15346
Diffstat (limited to 'source/blender/blenkernel/BKE_attribute.hh')
-rw-r--r--source/blender/blenkernel/BKE_attribute.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_attribute.hh b/source/blender/blenkernel/BKE_attribute.hh
index 05ab4f1f1f1..108993d91c0 100644
--- a/source/blender/blenkernel/BKE_attribute.hh
+++ b/source/blender/blenkernel/BKE_attribute.hh
@@ -666,6 +666,22 @@ class MutableAttributeAccessor : public AttributeAccessor {
void remove_anonymous();
};
+struct AttributeTransferData {
+ /* Expect that if an attribute exists, it is stored as a contiguous array internally anyway. */
+ GVArraySpan src;
+ AttributeMetaData meta_data;
+ bke::GSpanAttributeWriter dst;
+};
+/**
+ * Retrieve attribute arrays and writers for attributes that should be transferred between
+ * data-blocks of the same type.
+ */
+Vector<AttributeTransferData> retrieve_attributes_for_transfer(
+ const bke::AttributeAccessor &src_attributes,
+ bke::MutableAttributeAccessor &dst_attributes,
+ eAttrDomainMask domain_mask,
+ const Set<std::string> &skip = {});
+
bool allow_procedural_attribute_access(StringRef attribute_name);
extern const char *no_procedural_access_message;