- Kaunas, Lithuania
- https://aras-p.info/
- Joined on
2022-01-20
PLY export uses ascii_format
name for the same argument, so maybe follow that.
Suuuper minor: I'd put the float member before the bool ones. Right now it wastes 3 bytes of padding between the last bool and the float, in order to align the float to 4-byte boundary. This does not really matter all that much for this struct, but as a general guidance it's a good one to learn.
Similar to ASCII writer: fopen
will fail correctly writing to a non-ASCII path on Windows. Use BLI_fopen
from BLI_fileops.h
instead.
Maybe instead of use_apply_modifiers
this could be apply_modifiers
? That way it would be consistent with OBJ, PLY, Collada APIs.
The project got done, reviewed, feedback addressed and just landed to main branch for Blender 3.6 (43e9c90061fc1eb).
I've implemented option for vertex colors Linear vs sRGB color space in a30abe9c2e79a01. Defaulted to sRGB to match the current Python addon behavior.
I reopened, changed to ToDo, assigned to myself. The old discussion slipped from my radar indeed.
Interesting. So it might be that various people just write linear colors in there, without realizing that at 8 bits per channel there's severe banding in the darks :) Or alternatively, the…
Minor: these comments don't add much, it's very clear from the code flow what for example write_header
does.