Brad Mann - 2015-09-25

I'm getting a different result. If I load multiple meshes with UVs and flatten the layers, I lose the UVs of the first object in the list. The other's are retained correctly.

I'm not a developer but I've had a quick look at the source code to see if I could fix it.

I think it starts with line 318 in filter_layer.cpp:
MeshModel *destMesh= md.addNewMesh("","Merged Mesh");

MeshLab creates a new mesh empty mesh and then copies over data from other layers:

tri::Append<cmesho,cmesho>::Mesh(destMesh->cm,mmp->cm);</cmesho,cmesho>

But in the append.h file a note reads: "Attributes. This function will copy only those attributes that are present in both meshes." So maybe the empty destination mesh has no texture coordinates so they don't get copied from the meshes that do have them.

I hacked around it locally by making the layers merge into the first layer. It's not the desired behaviour but works for my pipeline.

I hope that helps you fix it.