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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-10-21 19:01:56 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-10-21 19:06:42 +0400
commit21836250c06c87bb267948bcc559b474e8ced564 (patch)
tree13aeee285336b7bacd56bb44b8160bf4ff95733b /source/blender/blenkernel/BKE_customdata.h
parentb770964558c49d6cbdd766956d9dde4100dcc75f (diff)
Fix T42260: By repeatedly joining meshes, you could end up with thousands of UVLayers
This is only an indirect fix, in fact: this commit adds a public API to check the maximum number of a given layer type (`CustomData_layertype_layers_max()`), and uses it to forbid too much layer creation in `CustomData_merge()`. This only affects UVs/VCol data though, but merge behavior in itself is not a bug actually, how user managed to get thousands of different UV layer names remain rather mysterious...
Diffstat (limited to 'source/blender/blenkernel/BKE_customdata.h')
-rw-r--r--source/blender/blenkernel/BKE_customdata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 9a6524cc9ab..51c78948c70 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -327,6 +327,7 @@ int CustomData_sizeof(int type);
/* get the name of a layer type */
const char *CustomData_layertype_name(int type);
bool CustomData_layertype_is_singleton(int type);
+int CustomData_layertype_layers_max(const int type);
/* make sure the name of layer at index is unique */
void CustomData_set_layer_unique_name(struct CustomData *data, int index);