From eca8c9dbe2d4cc5ced9fdaf780b45da5557bcb25 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 17 May 2022 15:02:59 +0200 Subject: [PATCH] Mesh: improve OBJ import by allowing arbitrary names for the mtllib file --- src/Mod/Mesh/App/Core/MeshIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index c4b6d23cdd..d83241392e 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -297,7 +297,7 @@ bool MeshInput::LoadSTL (std::istream &rstrIn) /** Loads an OBJ file. */ bool MeshInput::LoadOBJ (std::istream &rstrIn) { - boost::regex rx_m("^mtllib\\s+([\\x21-\\x7E]+)\\s*$"); + boost::regex rx_m("^mtllib\\s+(.+)\\s*$"); boost::regex rx_u("^usemtl\\s+([\\x21-\\x7E]+)\\s*$"); boost::regex rx_g("^g\\s+([\\x21-\\x7E]+)\\s*$"); boost::regex rx_p("^v\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)"