Details
Details
- Reviewers
Bastien Montagne (mont29)
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
I see more C++ I/O operators are not doing this correctly, but we should be using the BKE_reports systems to report errors like this, with op->reports.
That way they get propagated to the status bar, log editor, Python exceptions, etc.
| source/blender/io/stl/importer/stl_import.cc | ||
|---|---|---|
| 62 | This doesn't look safe to me: if the read fails, code will just assume it's an ascii stl | |
Comment Actions
Thanks for working on this.
| source/blender/io/stl/importer/stl_import.cc | ||
|---|---|---|
| 49 | RPT_ERROR generally should go along with doing nothing and returning OPERATOR_CANCELLED from the operator. | |
| source/blender/io/stl/importer/stl_import_ascii_reader.cc | ||
| 124 | This seems like it's the same case as the binary importer, and so should be RPT_ERROR also. | |
| source/blender/io/stl/importer/stl_import_binary_reader.cc | ||
| 39 | I don't know the STL specification, but I would guess this should also be an RPT_ERROR and the operator should then do nothing, not even create an empty mesh. | |