Skip to content
Snippets Groups Projects
Commit 4bc99179 authored by Patrik Huber's avatar Patrik Huber
Browse files

Fixed wrong filename when storing a textured obj with a relative path (e.g. "./results/out")

parent d75e544c
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,7 @@ inline void write_textured_obj(Mesh mesh, std::string filename)
boost::filesystem::path mtl_filename(filename);
mtl_filename.replace_extension(".mtl");
obj_file << "mtllib " << mtl_filename.string() << std::endl; // first line of the obj file
obj_file << "mtllib " << mtl_filename.filename().string() << std::endl; // first line of the obj file
// same as in write_obj():
if (mesh.colors.empty()) {
......@@ -142,7 +142,7 @@ inline void write_textured_obj(Mesh mesh, std::string filename)
texture_filename.replace_extension(".isomap.png");
mtl_file << "newmtl FaceTexture" << std::endl;
mtl_file << "map_Kd " << texture_filename.string() << std::endl;
mtl_file << "map_Kd " << texture_filename.filename().string() << std::endl;
return;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment