Aras Pranckevicius aras_p
Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:18 +01:00
IO: New C++ PLY importer/exporter

Similar here: fmt/format.h includes feel like they are not much needed.

Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:18 +01:00
IO: New C++ PLY importer/exporter

std::ifstream will fail on Windows when file path contains non-English characters. Use blender::fstream wrapper from BLI_fileops.hh instead.

Aras Pranckevicius suggested changes for blender/blender#104404 2023-02-17 22:15:18 +01:00
IO: New C++ PLY importer/exporter

Overall very nice!

Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:18 +01:00
IO: New C++ PLY importer/exporter

Minor for future cleanup: this is the same code as OBJ set_world_axes_transform (and possibly others?). Would be nice to share.

Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:18 +01:00
IO: New C++ PLY importer/exporter

Minor: feels like fmt/format.h things are already included via ply_file_buffer.hh above; should be no need to repeat them here. And fmt functionality is not directly used in FileBufferAscii class anyway.

Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:18 +01:00
IO: New C++ PLY importer/exporter

Minor: these comments don't add much, it's very clear from the code flow what for example write_header does.

Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:17 +01:00
IO: New C++ PLY importer/exporter

Minor for future cleanup: forward_axis_update and up_axis_update are exactly the same between OBJ and PLY code now. Might be good idea to move it into some shared place at some point (and while at it, maybe look whether Collada could share it).

Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:17 +01:00
IO: New C++ PLY importer/exporter

Minor: row is not needed for laying this out. I assume it came initially from OBJ code back when it was using axis-choices-as-inline-buttons style. It should be enough to just do:

Aras Pranckevicius commented on pull request blender/blender#104404 2023-02-17 22:15:17 +01:00
IO: New C++ PLY importer/exporter

What colorspace are PLY vertex colors defined in? Since they seem to be 8 bits per component, I would assume they are sRGB (linear colors would not have enough precision at just 8 bits). My impression is that Blender colors are in linear color space, when they are stored as floats. So the reading code here (and likewise, exporting code elsewhere) might need a sRGB<->Linear conversion.

Aras Pranckevicius pushed to main at blender/blender 2023-02-14 20:50:02 +01:00
db2eaa5c86 OBJ: fixed some faces wrongly skipped in invalid face validation logic (#104593)
Aras Pranckevicius closed issue blender/blender#104593 2023-02-14 20:50:01 +01:00
Importing attached OBJ file without Validate option crashes later when deleting vertices
Aras Pranckevicius pushed to main at blender/blender 2023-02-14 16:31:03 +01:00
cfe828b452 OBJ: Support polylines with more than 2 vertices.
Aras Pranckevicius merged pull request blender/blender#104503 2023-02-14 16:31:02 +01:00
OBJ: Support polylines with more than 2 vertices.
Aras Pranckevicius commented on pull request blender/blender#104503 2023-02-09 15:03:11 +01:00
OBJ: Support polylines with more than 2 vertices.

Code looks good to me! Would be nice to have some test coverage; do you have a relatively simple .obj file that uses this?