Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-05-26 17:53:59 +0300
committerBastien Montagne <bastien@blender.org>2021-05-26 18:05:01 +0300
commit72d660443bdb8ed0b8ab34fdfe068d4e065d7c58 (patch)
tree07d2a52a714056e1f28f850a64481e88eda61f96 /source/blender/blenkernel/BKE_lib_override.h
parent51ca9833d9da95c4342cc0b87a8757639499d1e4 (diff)
LibOverride: add recursive resync.
Recursive resync means also resyncing overrides that are linked from other library files into current working file. Note that this allows to get 'working' files even when their dependencies are out of sync. However, since linked data is never written/saved, this has to be re-done every time the working file is loaded, until said dependencies are updated properly. NOTE: This is still missing the 'report' side of things, which is part of a larger task to enhance reports regarding both linking, and liboverrides (see T88393). ---------- Technical notes: Implementing this proved to be slightly more challenging than expected, mainly because one of the key aspects of the feature was never done in Blender before: manipulating, re-creating linked data. This ended up moving the whole resync code to use temp IDs out of bmain, which is better in the long run anyway (and more aligned with what we generally want to do when manipulating temp ID data). It should also give a marginal improvement in performances for regular resync. This commit also had to carefully 'sort' libraries by level of indirect usage, as we want to resync first the libraries that are the least directly used, i.e. libraries that are most used by other libraries.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_override.h')
-rw-r--r--source/blender/blenkernel/BKE_lib_override.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_lib_override.h b/source/blender/blenkernel/BKE_lib_override.h
index f1ed5a453ba..0275c2c235c 100644
--- a/source/blender/blenkernel/BKE_lib_override.h
+++ b/source/blender/blenkernel/BKE_lib_override.h
@@ -47,6 +47,7 @@ struct ID;
struct IDOverrideLibrary;
struct IDOverrideLibraryProperty;
struct IDOverrideLibraryPropertyOperation;
+struct Library;
struct Main;
struct Object;
struct PointerRNA;
@@ -68,7 +69,9 @@ bool BKE_lib_override_library_is_user_edited(struct ID *id);
struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain,
struct ID *reference_id,
const bool do_tagged_remap);
-bool BKE_lib_override_library_create_from_tag(struct Main *bmain);
+bool BKE_lib_override_library_create_from_tag(struct Main *bmain,
+ const struct Library *reference_library,
+ const bool do_no_main);
bool BKE_lib_override_library_create(struct Main *bmain,
struct Scene *scene,
struct ViewLayer *view_layer,