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:
authorDennis Ranish <Codec>2022-06-08 22:10:32 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-06-08 22:10:32 +0300
commit9c28f0eb37aebd6e5eae0763b008ef02d5ce081b (patch)
tree65bc5d816ffc13a30ebf9aa454dd6fee7f512ed1 /source/blender/blenkernel/BKE_attribute.h
parentf69c565a33ca58bb95a2bd22de0e211799508182 (diff)
D14823: Adds operator to duplicate the active color attribute layer
Fixes T97706 Adds operator to duplicate the active color attribute layer. Adds `"Color Attribute Specials"` menu to color attribute ui to access the `"geometry.color_attribute_duplicate"` operator. Internally adds a function that duplicates a referenced CustomDataLayer - `BKE_id_attribute_duplicate` mostly copies the existing `BKE_id_attribute_new` - but gets the type and domain from the referenced layer - and copies the data from the old layer into the new layer Reviewed By: Joseph Eagar & Hans Goudey & Julien Kaspar Differential Revision: https://developer.blender.org/D14823 Ref D14823
Diffstat (limited to 'source/blender/blenkernel/BKE_attribute.h')
-rw-r--r--source/blender/blenkernel/BKE_attribute.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h
index 52a3e01026c..5755ddb3018 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -60,6 +60,13 @@ struct CustomDataLayer *BKE_id_attribute_new(
struct ID *id, const char *name, int type, eAttrDomain domain, struct ReportList *reports);
bool BKE_id_attribute_remove(struct ID *id, const char *name, struct ReportList *reports);
+/**
+ * Creates a duplicate attribute layer.
+ */
+struct CustomDataLayer *BKE_id_attribute_duplicate(struct ID *id,
+ struct CustomDataLayer *layer,
+ struct ReportList *reports);
+
struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id,
const char *name,
int type,