diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-08-04 21:10:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-04 21:14:50 +0300 |
commit | 9ea9fc1f34a90a1db92199293b813319f78795d3 (patch) | |
tree | ae055fe398c632c690fd14b9a036c125815d6585 /source/blender/blenkernel/intern/customdata.cc | |
parent | b29d6de77a61beb7cbb3bc1839658e8c4796d714 (diff) |
Fix T100099: Cycles crash baking vertex colors in edit mode
This was not supported, added now.
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.cc')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index b12eafa9cef..82356e06d2c 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -3439,6 +3439,17 @@ int CustomData_get_offset(const CustomData *data, int type) 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; +} + int CustomData_get_n_offset(const CustomData *data, int type, int n) { /* get the layer index of the active layer of type */ |