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:
authorJoseph Eagar <joeedh@gmail.com>2022-06-01 02:35:22 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-06-01 02:35:22 +0300
commitb38a59881be863bff079b4600a08d6b3a8b4b59a (patch)
tree713fb7596630d92631b459fe5072b64e3eec1644 /source/blender/blenkernel/BKE_attribute.h
parent79cee340a8af413822e752057b71bf0c91e6e40c (diff)
parent6cee4049143abf692af6ffb78c109fb0760fe67d (diff)
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source/blender/blenkernel/BKE_attribute.h')
-rw-r--r--source/blender/blenkernel/BKE_attribute.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h
index ebc95c4247c..050cfe1ed85 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -42,6 +42,8 @@ typedef enum AttributeDomainMask {
ATTR_DOMAIN_MASK_ALL = (1 << 5) - 1
} AttributeDomainMask;
+#define ATTR_DOMAIN_AS_MASK(domain) ((AttributeDomainMask)((1 << (int)(domain))))
+
/* All domains that support color attributes. */
#define ATTR_DOMAIN_MASK_COLOR \
((AttributeDomainMask)((ATTR_DOMAIN_MASK_POINT | ATTR_DOMAIN_MASK_CORNER)))
@@ -62,8 +64,13 @@ bool BKE_id_attribute_remove(struct ID *id,
struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id,
const char *name,
- int type,
- AttributeDomain domain);
+ const int type,
+ const AttributeDomain domain);
+
+struct CustomDataLayer *BKE_id_attribute_search(const struct ID *id,
+ const char *name,
+ const CustomDataMask type,
+ const AttributeDomainMask domain_mask);
AttributeDomain BKE_id_attribute_domain(const struct ID *id, const struct CustomDataLayer *layer);
int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer);