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-08-04 21:48:41 +0300
committerHans Goudey <h.goudey@me.com>2022-08-04 21:48:41 +0300
commit77047d2088016140da2669fcda9ba2a23336e14b (patch)
tree4464cd01a2a0a37fc1ec5026bad25380719b8971 /source/blender/blenkernel/intern/customdata.cc
parentdd4c47314e7550da58753c41d0e22fd3762a7fba (diff)
parentbae2ce069516f7e4524fb5a514afef4d9da32a0e (diff)
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.cc')
-rw-r--r--source/blender/blenkernel/intern/customdata.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc
index 4d11f4daedf..8444f15cb8b 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -3477,6 +3477,17 @@ int CustomData_get_n_offset(const CustomData *data, const int type, const int n)
return data->layers[layer_index].offset;
}
+int CustomData_get_offset_named(const CustomData *data, int type, const char *name)
+{
+ /* get the layer index of the active layer of type */
+ int layer_index = CustomData_get_named_layer_index(data, type, name);
+ if (layer_index == -1) {
+ return -1;
+ }
+
+ return data->layers[layer_index].offset;
+}
+
bool CustomData_set_layer_name(const CustomData *data,
const int type,
const int n,