How to Handle Forward Compatibility #109151
Closed
opened 2023-06-20 10:51:28 +02:00 by Bastien Montagne
·
18 comments
No Branch/Tag Specified
main
blender-v3.3-release
blender-v3.6-release
asset-browser-frontend-split
universal-scene-description
temp-sculpt-dyntopo
brush-assets-project
asset-shelf
anim/armature-drawing-refactor-3
temp-sculpt-dyntopo-hive-alloc
tmp-usd-python-mtl
tmp-usd-3.6
blender-v3.5-release
blender-projects-basics
blender-v2.93-release
temp-sculpt-attr-api
realtime-clock
sculpt-dev
gpencil-next
bevelv2
microfacet_hair
xr-dev
principled-v2
v3.6.3
v3.3.11
v3.6.2
v3.3.10
v3.6.1
v3.3.9
v3.6.0
v3.3.8
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
Labels
Clear labels
This issue affects/is about backward or forward compatibility
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
This issue affects/is about backward or forward compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest: Wayland
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest: Wayland
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
10 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#109151
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Forward compatibility is the ability of a software to open files generated by a more recent version of itself.
Blender has been designed since the beginning with a strong forward compatibility capacity. Its low-level data model (DNA) and its file format intrinsically support it.
On a higher level (user-level data and features) however, it is much more challenging to achieve over a long period of time. This is especially true when existing type of data or features are refactored.
Two types of forward compatibility breakage can be identified:
A. Refactor 'in place', where the internal organization and meaning of the data changes, but the general container (often an ID) remain the same. E.g. recently, the refactor of the Mesh data-block.
B. Refactor by replacing a deprecated data by a new one. E.g. recently the replacement of Proxies by LibOverrides, or the future replacement of Greasepencil v2 by the v3.
From a forward compatibility perspective, the
A
variant is usually way more difficult to handle properly than theB
one.Current Situation
So far, Blender has striven to ensure as much forward compatibility as possible, following these principles:
BLENDER_FILE_MIN_VERSION
/BLENDER_FILE_MIN_SUBVERSION
.Problems With Current Situation
While current situation works OK most of the time in basic cases (like appending a mesh object from a more recent .blend file version), it is usually impossible/unusable to open e.g. complex production files with older Blender versions.
Further more, the lack of documentation and testing has lead to critical breakages recently. E.g. any .blend file saved with Blender 4.0 containing a mesh will crash on any version version of Blender 3.5 or older. This includes the 3.3 LTS one (see #108491).
Proposed New Handling
Note: here, when referring to a .blend file, "incompatible" means that its min version > current Blender version, and "newer" means that its version > current Blender version.
The main proposed change is to not allow opening .blend files when their
BLENDER_FILE_MIN_VERSION
is higher than the current blender version.This would integrate into this new proposed handling:
BLENDER_FILE_MIN_VERSION
/BLENDER_FILE_MIN_SUBVERSION
.Proposed Practical Changes
In case new handling described above is accepted, here are the proposed steps to implement it, by order of highest priority:
3.6
(to allow 3.6 to be used as converter between both mesh data versions).Add some automated testing (CI) for forward (and backward!) compatibility.Created dedicated task: #110922Interest/Compatibility
label to projects.blender.org@brecht @sergey @dfelinto @Ton here is the design task for the forward compatibility issue. Let me know if I forgot something or am not clear enough.
@ideasman42 think this topic may also interest you?
My proposal is:
Eventually we could be smarter about when to show the version warning (e.g., only when Blender read non-UI DNA data that was discarded).
Mockup of how the status bar could look like when we have a version forward-mismatch. When there is no warning, we can show the status bar with "plain-text" as we do now e.g., 3.5).
Detailed view + mouse to get more information:
It can still be combined with more information.
+1 (although you probably mean no popup or report warning, since there will be an indicator in the status bar)
+1
Completely offtopic but this compact layout is great for when we have Blender updates checker (in green, not red)
+1, this is the most important one because this is when you could lose data.
On Save/Ctrl+S, instead of simply saving, Blender should open the blocking dialog similar to when we have modified images:

With the text
This file has been saved with a newer version of Blender (4.0.0), it is recommended to use that version (or newer) to prevent loss of data.
, or something along those lines.This seems generally fine.
Am I understanding correctly that we are not planning any changes for 3.6.0 then?
In my opinion, no. The set of problems we are trying to prevent is the same as opening the .blend file.
To be clear, "incompatible" here means the .blend file min version > current Blender version, and "newer" means .blend file version > current Blender version.
I think there will be changes (need to backport the 'do not open too much future files' process in there as well), but I don't think there is anything urgent, it can be done as part of a future 3.6LTS update imho.
Agreed.
Yes, correct.
Thanks for the feedback, updated the design task accordingly (regarding warnings when opening newer .blend file, and no support for link/append from incompatible .blend file).
Proposal looks good, am not so keen on permanent warning (adds a special case & needs to coexist with other warnings which come & go while using Blender), but I don't feel that strongly about it either.
A mockup on top of what Pablo suggested. I added the Save As option, but also made the text a bit shorter.
I would suggest going with this and do a final pass on the text after the 3.6 release once Pablo has more time.
Edit: Overwrite may be the correct English term, and we could even use that instead of "Save" in the button label.
@dfelinto Since this dialog looks very close to the "Do you want to save before closing blender?" dialog, I suggest to change the icon to the warning symbol. On top of having the button say "Overwrite".
And another question: What about the autosave? Should that just save the current state as-is?
@filedescriptor Auto Save doesn't overwrite existing data, it creates new files in the temp directory. It should just keep saving what it already does. So users can recover from a crash and still decide whether they want to save the changes, save as, or export to another format.
I have no strong opinion here and I'm ok deferring to Pablo to make a decision. But I find both scenarios equally alarming, so not sure I would priorizite one with exclamation mark over the other.
Per the request for feedback from the weeklies on devatalk: I am pro the UX of adding more warnings, either permenant with versioning warnings on overwrite or save as. Good proposal and solution to the issue.
Added a WIP wiki page about Blender compatibility handling: https://wiki.blender.org/wiki/Process/Compatibility_Handling
Also had to add a section about backward compatibility, though this is a more straight-forward topic I think it's good to be documented as well.
Still very much WIP, though.
This looks great guys, and a very much needed feature!
If I may add my two cents based on my personal experience (coming from India where English is non-native)
For the same reason, I would also suggest the default option should be Save As, and the alternative should be Save/Overwrite.
Mockup based on suggestions (looks messy because I'm throwing in all ideas... we can pick only what works for us) :
For extra clarity, I'd replace "current Blender" with "currently running Blender". I had to read a few times before I understood this, as "current Blender version" could also be read as "the latest release".
I think the "will be converted" is too promising. This mockup starts with a positive message that your data will be converted. The warning that this might not be a complete conversion is only shown at the end, and in the smallest font. I'd be afraid people are going to miss it.
I do like the red "Overwrite" button on the right, and the blue "Save As" button on the left. This makes the non-overwriting, safe option the default, and the dangerous, lossy option the special one. If people don't read and just click the right-most button (as that's typically the "next next next until it's done" spot) they don't lose their data.
Note that there is now an actual implementation in #110109 to test and give UI feedback on.
There should also be user level documentation making it clear what users can expect regarding file compatibility. On a quick search I couldn't find anything in the current manual.
Good point, added another entry to the TODO list in the task above.
Think we can close this one now, testing compatibility has its own dedicated task: #110922.