Files
test/scripts/startup
Jacques Lucke 6a90382390 Core: support buffers larger than 2GB in .blend files
This is implements option 1 of #129309. It contains a few changes:
* Split `BHead8` into `SmallBHead8` and `LargeBHead8`. The latter is the new one
  and uses `int64_t` for array sizes instead of just `int`. That applies to to
  buffer size in bytes (`len`) and the array size (`nr`).
* The first .blend file header (the first few bytes of the file) are updated
  according to #129309.
* Support reading files with that use `BHead4`, `SmallBHead8` and `LargeBHead8`.
* New option in the preferences that controls whether new files are written with
  the older `SmallBHead8` or the new `LargeBHead8`. The new file format is
  disabled by default. Potential unofficial 32 bit builds (#67184) always write
  `BHead4`, but can read all types (in theory anyway, can't test it).

Note that there are other places in Blender that don't fully support arrays this
large. E.g. I noticed that the spreadsheet currently can't scroll all the way
down.

The experimental option can be removed once we are in the 5.0 branch, at which
point only 4.5 will be able to open the files saved with 5.0.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/129751
2025-04-29 10:55:26 +02:00
..