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>2022-02-01 18:11:59 +0300
committerBastien Montagne <bastien@blender.org>2022-02-02 11:47:10 +0300
commit286fcb3a605a51a2d8e542095ffa87ceb71fdd08 (patch)
tree59c3337fffa3106b0c06fe866ead1a8c5fbeab8f /source/blender/blenkernel/BKE_lib_override.h
parente8b3bd15e8d91c3cb8fa3bf33b3328e1dd109b75 (diff)
LibOverride: Add 'owner library' info to some liboverride code.
This will help when dealing with liboverrides from other library files, e.g for resync or proxies conversion. This commit only affects proxy conversion. Part of T91671.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_override.h')
-rw-r--r--source/blender/blenkernel/BKE_lib_override.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_lib_override.h b/source/blender/blenkernel/BKE_lib_override.h
index 30e75259967..e8065566c97 100644
--- a/source/blender/blenkernel/BKE_lib_override.h
+++ b/source/blender/blenkernel/BKE_lib_override.h
@@ -100,6 +100,9 @@ struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain,
* main. You can add more local IDs to be remapped to use new overriding ones by setting their
* LIB_TAG_DOIT tag.
*
+ * \param owner_library: the library in which the overrides should be created. Besides versioning
+ * and resync code path, this should always be NULL (i.e. the local .blend file).
+ *
* \param reference_library: the library from which the linked data being overridden come from
* (i.e. the library of the linked reference ID).
*
@@ -109,6 +112,7 @@ struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain,
* \return \a true on success, \a false otherwise.
*/
bool BKE_lib_override_library_create_from_tag(struct Main *bmain,
+ struct Library *owner_library,
const struct Library *reference_library,
bool do_no_main);
/**
@@ -122,16 +126,24 @@ bool BKE_lib_override_library_create_from_tag(struct Main *bmain,
*
* \param view_layer: the active view layer to search instantiated collections in, can be NULL (in
* which case \a scene's master collection children hierarchy is used instead).
+ *
+ * \param owner_library: the library in which the overrides should be created. Besides versioning
+ * and resync code path, this should always be NULL (i.e. the local .blend file).
+ *
* \param id_root: The root ID to create an override from.
+ *
* \param id_reference: Some reference ID used to do some post-processing after overrides have been
* created, may be NULL. Typically, the Empty object instantiating the linked collection we
* override, currently.
+ *
* \param r_id_root_override: if not NULL, the override generated for the given \a id_root.
+ *
* \return true if override was successfully created.
*/
bool BKE_lib_override_library_create(struct Main *bmain,
struct Scene *scene,
struct ViewLayer *view_layer,
+ struct Library *owner_library,
struct ID *id_root,
struct ID *id_reference,
struct ID **r_id_root_override);