File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 33// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
44
55#include < cstdarg>
6+ #include < sstream>
67
78#include " pointcloud.h"
89
@@ -29,7 +30,13 @@ PointCloud::get(ustringhash filename, bool write)
2930 // Not found. Create a new one.
3031 Partio::ParticlesDataMutable* partio_cloud = nullptr ;
3132 if (!write) {
32- partio_cloud = Partio::read (filename.c_str (), false );
33+ // Mute Partio error prints: by default Partio::read sends errors directly
34+ // to std::err, but in most cases we want errors to go via errorfmt so the
35+ // renderer can recognize the message as an error, as we do in
36+ // pointcloud_search and pointcloud_get.
37+ std::stringstream m_errorStream;
38+
39+ partio_cloud = Partio::read (filename.c_str (), false , m_errorStream);
3340 if (!partio_cloud)
3441 return nullptr ;
3542 } else {
You can’t perform that action at this time.
0 commit comments