Refactor: Properly formalize special versioning done after most of readfile code. #111147

Merged
Bastien Montagne merged 1 commits from mont29/blender:tmp-do-version-after-all into main 2023-08-16 16:22:06 +02:00

1 Commits

Author SHA1 Message Date
Bastien Montagne b912b80e85 Refactor: Properly formalize special versioning done after most of readfile code.
In a few cases (IPO conversion, Proxy conversion, ...), versioning
implies creating or removing IDs, and/or needs access to the whole Main
data-base.

So far this was done ad-hoc by adding some code at the end of
`setup_app_data`.

This commit formalizes this process by adding a BLO call
(`BLO_read_do_version_after_setup`) that will encapsulate all such
complex versioning code.

NOTE: This commit does not address the existing issue that this
versioning code is never performmed when linking new data (outside of
the 'opening a blendfile' context). This topic would require its own
design task.

NOTE: This commit does not fix the few current evil cases of ID creation in
regular versioning code. This will be addressed separately.

Although this commit does modifies slightly some logic in this specific
versioning process, no behavioral changes are expected here.
2023-08-16 16:20:48 +02:00