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:
authorCampbell Barton <ideasman42@gmail.com>2021-02-11 16:42:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-11 16:42:36 +0300
commit18ac37a39b7d74e0fb76cf2b1a09c470c32a68bf (patch)
treeac9a043bce6284dbbb3062ca7e78b116519d3c0c /source/blender/blenkernel/intern/customdata.c
parentdabf96f732d1ce5f44f53230317ff0d0b8a380df (diff)
parent196dfc01a3e99c3bef0e44acf599bca50ae0300e (diff)
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.c')
-rw-r--r--source/blender/blenkernel/intern/customdata.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 37e9c810123..782b4fc200e 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -4273,6 +4273,18 @@ bool CustomData_layertype_is_singleton(int type)
}
/**
+ * Has dynamically allocated members.
+ * This is useful to know if operations such as #memcmp are
+ * valid when comparing data from two layers.
+ */
+bool CustomData_layertype_is_dynamic(int type)
+{
+ const LayerTypeInfo *typeInfo = layerType_getInfo(type);
+
+ return (typeInfo->free != NULL);
+}
+
+/**
* \return Maximum number of layers of given \a type, -1 means 'no limit'.
*/
int CustomData_layertype_layers_max(const int type)