I am trying to upgrade a LW importer and I have come across a mesh that has more than 8 UVMaps, it has 766.
I know that if you use mesh in the normal mode you can only have 8 UVMaps.
If you want to have more than 8 you have to create a bmesh object and copy across the mesh data and operate on the bmesh equivalent.
This is the code I am implementing:
bm = bmesh.new() bm.from_mesh(me) for i, uvmap_key in enumerate(allmaps): print(i, uvmap_key) bm.loops.layers.uv.new(uvmap_key) bm.to_mesh(me) bm.free()
The only problem is that when I try and add 766 UVmaps this way,
(len(allmaps) == 766), each time it adds a UVMap it gets slower and slower and eventually taking seconds to add 1 UVMap, which I am see via the print statement to the screen.
Is this the correct way to add many many UVMaps or is there is an realistic upper limit on how many can be added even to a Bmesh?
I suspose it is a question of operation, but do the 8+ UVMaps even survive the path back into the ordinary mesh format at the end?
Does any one know of another importer handling this number of UVMaps successfully?