3 ms·
It also means you can't share files between little endians and big endians.
by glandium 3y ago
It also means you can't share files between little endians and big endians.
- WJW 3y agoIs this a real problem though? It seems to me that any system you would realistically want to run Blender on will be little-endian.
- tjalfi 3y agoIt isn't a real problem. Blender supports only little-endian targets and the code byte swaps data files as needed. I guess someone could port it to AIX, z/OS, or Linux/zSeries, but that's unlikely at best.
- rollcat 3y agoThere's almost certainly byte order+version markers in the header, a "happy path" that just memcpy's the structs, and a "safe path" that does byte order swapping, migrates the old structs to the current format, etc. You can version the structs/loaders by keeping the relevant header files in their own version subfolders, and copious usage of sed. I've done this in a Django project to maintain support for ancient untouchable clients using an old version of the API, it's pretty manageable.
- tjalfi 3y agoI checked the repo. Blender detects files with a different endian and byte swaps if necessary.
- TazeTSchnitzel 3y agoIt doesn't, you just need to be careful to always read and write properties via accessor functions.