I have an OBJ mesh with multiple texture image materials with face texture coordinates.  The input OBJ file correctly separates each texture by placing "usemtl material0000" in the face declarations ('f ...').

I have a typdef that defines my mesh class: 
`typedef OpenMesh::TriMesh_ArrayKernelT<>  Mesh;`

To open the OBJ file, I set `mesh.request_halfedge_texcoords2D()`.  I have verified texture coordinates are correct.

I'm trying to save the mesh (no modifications), but cannot get the OBJ output to have the correct texture material lines written to the file.  Specifically, the face indices should be separated by 'usemtl matXX' for each different material.

I've tried enabling and disabling face colors in my loading function.  With face colors enabled, I only get the 1st material.  All other materials are missing.  

When I disable face colors, but have FaceTexCoord enabled, line 330 of OBJWrite.cc ignores the line to write the 'usemtl mat' line.  

Is this a bug, or am I missing something?  Thanks in advance,
Jan-Michael

Reading code:

   OpenMesh::IO::Options ropt;
    ropt += OpenMesh::IO::Options::FaceTexCoord;
    ropt += OpenMesh::IO::Options::FaceColor;

    _mesh.request_vertex_normals();
    _mesh.request_face_normals();
    _mesh.request_halfedge_texcoords2D();
    _mesh.request_face_colors();
    

    if (!OpenMesh::IO::read_mesh(_mesh, path, ropt))
    {
        return false;
    }

Writing code:

    OpenMesh::IO::Options wopt;
    if (_mesh.has_vertex_normals())
        wopt += OpenMesh::IO::Options::VertexNormal;

    //update textures
    if (_mesh.has_halfedge_texcoords2D())
    {
        wopt += OpenMesh::IO::Options::FaceTexCoord;
        wopt += OpenMesh::IO::Options::FaceColor;
    }
    
    return OpenMesh::IO::write_mesh(_mesh, path, wopt);