diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-10 08:43:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-10 08:43:31 +0400 |
commit | ceb9701507848865434557af4ec89ce9b6560446 (patch) | |
tree | f0374162d6ab4d7536cca7bfffb9c2eb399a4935 /source/blender/blenkernel/intern/customdata.c | |
parent | 8cf374d4012e193a50a58f1e2abcdae306ae33cd (diff) |
don't store bevel weights or edge crease customdata layers in editmode unless they are needed.
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.c')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 4c6b0c08158..82c0535254b 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2095,6 +2095,14 @@ void *CustomData_get_layer_named(const struct CustomData *data, int type, return data->layers[layer_index].data; } +int CustomData_get_offset(const CustomData *data, int type) +{ + /* get the layer index of the active layer of type */ + int layer_index = CustomData_get_layer_index(data, type); + if (layer_index < 0) return -1; + + return data->layers[layer_index].offset; +} int CustomData_set_layer_name(const CustomData *data, int type, int n, const char *name) { |