Page MenuHome

PLY: Export in binary format
Needs RevisionPublic

Authored by Adrian Vogelsgesang (vogelsgesang) on Jan 25 2019, 1:14 AM.

Details

Summary

So far, the PLY exporter was only able to write ASCII-encoded.ply files.
This commit extends the PLY exporter such that it is now able to also
write binary files, both little-endian and big-endian. The user can
choose the preferred format variation using a new drop-down.
By default, "Text" is selected, such that the current behavior stays the
default behavior.

This change was mostly motivated since I am currently writing my own
stand-alone .ply tool and it is easier to read raw binary data than to
do string parsing.
Not sure if this change is valuable for any other use case, too, but
I thought to submit it nevertheless, maybe it turns out to be useful for
someone else.

Diff Detail

Event Timeline

forgot to add all changes to git before posting the previous diff :/

There were a few calls to encode("ascii") missing, such that exporting as text didn't work as expected anymore

Laurence Boissieux (lbx) requested changes to this revision.May 5 2020, 4:09 PM

Hi, this is exactly what I need ! But unfortunately it doesn't work any more in 2.82. Please help!

This revision now requires changes to proceed.May 5 2020, 4:09 PM

Hi @Adrian Vogelsgesang (vogelsgesang) even though your patch was not accepted at the time, I used it as a starting point for my own ply binary export implementation, so it wasn't for nothing as it helped me a lot, thank you.