This patch mutes the error printed to std::err from inside Partio when it fails to read a pointcloud. OSL's pointcloud_search and pointcloud_find already reports errors "the proper way" via errorfmt, so a failed read will still thrown an error. Plain prints like this can sneak past log-limiting filtering and result in very large log files.
[X] I have updated the documentation, if applicable.
[X ] I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
[X ] My code follows the prevailing code style of this project. If I haven't
already run clang-format v17 before submitting, I definitely will look at
the CI test that runs clang-format and fix anything that it highlights as
being nonconforming.
Description
This patch mutes the error printed to std::err from inside Partio when it fails to read a pointcloud. OSL's pointcloud_search and pointcloud_find already reports errors "the proper way" via errorfmt, so a failed read will still thrown an error. Plain prints like this can sneak past log-limiting filtering and result in very large log files.
Currently, running something like
shader partioerror(){ float test[1]; if(pointcloud_search("non-existing",P,1.0,1,"test",test)) printf("Success"); }
in testshade, will print
Partio: No extension detected in filename ERROR: pointcloud_search: could not open "non-existing"
with the patch, it will just print ERROR: pointcloud_search: could not open "non-existing"
Tests
I haven't added any tests yet
Checklist: