Blender Git Loki
Git Commits -> Revision c15c223
Revision c15c223 by Dalai Felinto (master) August 27, 2010, 00:35 (GMT) |
Fix for Mesh.uv_textures.new(name="my_uv") returning the wrong uvmap - reported by Vitor Balbio - not in tracker. The code was taking the last layer, but that is only valid if the mesh has only one kind of CustomData types (e.g. only UVMaps or only VertexColors). The solution I found is to call CustomData_get_named_layer_index instead. To avoid some situations where an uv with this name may already exist and the number of UVs is already the limit we are returning a CDL only when the texture is properly created. As a bonus that also fixes the same problem with VertexColor. |
Commit Details:
Full Hash: c15c223ccdc7d28ae9dd240cfcb4a953f453b1fe
SVN Revision: 31601
Parent Commit: 240b164
Lines Changed: +12, -10
1 Modified Path:
/source/blender/makesrna/intern/rna_mesh.c (+12, -10) (Diff)