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:
authorSybren A. Stüvel <sybren@blender.org>2021-11-30 12:41:23 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-11-30 12:41:23 +0300
commitc12d8a72cef557c0d9c76e78c3754e3009e74efd (patch)
treede35215da19c383d3bc73bf9ae7c8096210b1431 /source/blender/blenkernel/BKE_bpath.h
parente7ae9f493aaa004caf3627489752139f177a807b (diff)
BPath traversing: allow skipping weak library references
Add flag to `BKE_bpath_traverse_id()` and friends to skip weak references (see below). This makes a distinction between "this blend file depends on that file" and "this blend file references that file, but doesn't directly use its data". This distinction is for the Asset Bundle install operator, which refuses to copy the blend file when it's not self-contained. Weak references are those that are not directly used by the blend file, but are still present to allow path rewriting. For example, when an Asset is loaded its originating blend file is saved in `ID::library_weak_reference`; this reference is purely for deduplication purposes, and not for actually loading any data. Reviewed by: mont29, brecht Differential Revision: https://developer.blender.org/D13412
Diffstat (limited to 'source/blender/blenkernel/BKE_bpath.h')
-rw-r--r--source/blender/blenkernel/BKE_bpath.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bpath.h b/source/blender/blenkernel/BKE_bpath.h
index 3ec5409ca7f..65ccfaebd35 100644
--- a/source/blender/blenkernel/BKE_bpath.h
+++ b/source/blender/blenkernel/BKE_bpath.h
@@ -70,6 +70,12 @@ enum {
BKE_BPATH_TRAVERSE_SKIP_MULTIFILE = (1 << 3),
/* reload data (when the path is edited) */
BKE_BPATH_TRAVERSE_RELOAD_EDITED = (1 << 4),
+ /* Skip weak reference paths. Those paths are typically 'nice to have' extra information, but are
+ * not used as actual source of data by the current .blend file.
+ *
+ * NOTE: Currently this only concerns the weak reference to a library file stored in
+ * `ID::library_weak_reference`. */
+ BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES = (1 << 5),
};
/* high level funcs */