Fix T42260: By repeatedly joining meshes, you could end up with thousands of UVLayers
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 21 Oct 2014 15:01:56 +0000 (17:01 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 21 Oct 2014 15:06:42 +0000 (17:06 +0200)
commit21836250c06c87bb267948bcc559b474e8ced564
tree13aeee285336b7bacd56bb44b8160bf4ff95733b
parentb770964558c49d6cbdd766956d9dde4100dcc75f
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...
source/blender/blenkernel/BKE_customdata.h
source/blender/blenkernel/intern/customdata.c