@@ -170,10 +170,10 @@ class PLYMesh final : public Mesh<Float, Spectrum> {
170170 m_name = file_path.filename ().string ();
171171
172172 auto fail = [&](const char *descr) {
173- Throw (" Error while loading PLY file \" %s\" : %s!" , m_name , descr);
173+ Throw (" Error while loading PLY file \" %s\" : %s!" , file_path. string () , descr);
174174 };
175175
176- Log (Debug, " Loading mesh from \" %s\" .." , m_name );
176+ Log (Debug, " Loading mesh from \" %s\" .." , file_path. string () );
177177 if (!fs::exists (file_path))
178178 fail (" file not found" );
179179
@@ -189,7 +189,7 @@ class PLYMesh final : public Mesh<Float, Spectrum> {
189189 Log (Warn,
190190 " \" %s\" : performance warning -- this file uses the ASCII PLY format, which "
191191 " is slow to parse. Consider converting it to the binary PLY format." ,
192- m_name );
192+ file_path. string () );
193193 stream = parse_ascii ((FileStream *) stream.get (), header.elements );
194194 }
195195 } catch (const std::exception &e) {
@@ -417,7 +417,7 @@ class PLYMesh final : public Mesh<Float, Spectrum> {
417417
418418 m_faces = dr::load<DynamicBuffer<UInt32>>(faces.get (), m_face_count * 3 );
419419 } else {
420- Log (Warn, " \" %s\" : skipping unknown element \" %s\" " , m_name , el.name );
420+ Log (Warn, " \" %s\" : skipping unknown element \" %s\" " , file_path. string () , el.name );
421421 stream->seek (stream->tell () + el.struct_ ->size () * el.count );
422422 }
423423 }
@@ -426,7 +426,7 @@ class PLYMesh final : public Mesh<Float, Spectrum> {
426426 fail (" invalid file -- trailing content" );
427427
428428 Log (Debug, " \" %s\" : read %i faces, %i vertices (%s in %s)" ,
429- m_name , m_face_count, m_vertex_count,
429+ file_path. string () , m_face_count, m_vertex_count,
430430 util::mem_string (m_face_count * face_struct->size () +
431431 m_vertex_count * vertex_struct->size ()),
432432 util::time_string ((float ) timer.value ())
@@ -435,7 +435,7 @@ class PLYMesh final : public Mesh<Float, Spectrum> {
435435 if (!m_face_normals && !has_vertex_normals) {
436436 Timer timer2;
437437 recompute_vertex_normals ();
438- Log (Debug, " \" %s\" : computed vertex normals (took %s)" , m_name ,
438+ Log (Debug, " \" %s\" : computed vertex normals (took %s)" , file_path. string () ,
439439 util::time_string ((float ) timer2.value ()));
440440 }
441441
0 commit comments