0
0
forked from blender/blender
blender/scripts
Bastien Montagne 15f6e83319 Core: Implement new blendfile compatibility handling.
This implements the main aspects of changes to blendfile compatibility
as designed in #109151:
* Blender files which file minversion is newer than current Blender
  executable won't be loaded at all.
* Blender files which file version is newer than current Blender will
  triger systematic warning to user:
  * In the status info bar (lower right corner in default UI).
  * When attempting to save (overwrite) them.

This means that the file minversion becomes a hard limit, and not a
soft, warning-only as it used to be. Further more, forward compatibility
warning is now systematic (instead of depending on file minversion),
and more visible for users.

See also https://wiki.blender.org/wiki/Process/Compatibility_Handling
for details over the new policy.

Technically:
* Opening any file with a minversion newer than current Blender file one
  now triggers an early abort, with an error message reported to the user.
  This is handled by a new utils called from `blo_decode_and_check`.
* Any file newer than current Blender version sets a new
  `has_forward_compatibility_issues` flag in Main struct at read time.
* Status bar info area is turned into a template, which uses this flag
  to display special warning UI and tooltip when set.
* A new confirmation popup appears when user tries to save (overwrite)
  such a 'newer' blendfile, stating potential loos of data, and
  proposing by default to 'save as' instead.
* The 'quit unsaved' popup has also been updated to 'save as' instead of
  'save' when the edited file is has potential forward compitibility
  issues.

NOTE: For 3.6LTS, an additional hot-fix is applied on read file
minversion, to ensure that all files from early 4.0 develpment stages
remain readable in Blender 3.6LTS after this commit.

Part of #109151 (PR !110109).
2023-08-09 17:39:05 +02:00
..
freestyle Cleanup: autopep8 2023-03-01 22:12:18 +11:00
modules Docs: Fix layout of bpy.types.Object Python API documents 2023-08-09 17:12:51 +02:00
presets Animation: Change channel selection key preferences in IC keymap 2023-06-21 08:14:56 +02:00
site
startup Core: Implement new blendfile compatibility handling. 2023-08-09 17:39:05 +02:00
templates_osl
templates_py PyAPI: require a unique_id for bl_ui.generic_ui_list 2023-06-20 11:50:30 +10:00