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-10-19 17:08:03 +0300
committerBastien Montagne <bastien@blender.org>2021-10-19 17:26:26 +0300
commitb3b7319de7aaa17d96e304857bc57401bb11ad17 (patch)
tree74d09915b21902e3e14dcc9fd998a85abf70cc73 /source/blender/blenloader/BLO_readfile.h
parent1c5722ba071ac08042f2e3150495b865a0ffa95a (diff)
Fix T92224: Refactor of append code unexpectedly changed behavior with 'localize all' off.
In 2.93 and before, when appending wityh 'localize all' off, all linked IDs (including indirectly linked ones) from initial library would be made local. In 3.0, after refactor from rB3be5ce4aad5e, only directly linked IDs (i.e. user-selected IDs) would be made local. This change was not intentional (result of confusing code and naming in previous implementation), and old behavior is used in some workflows to control which data is kept linked and which data is made local. This commit revert to 2.93 behavior. NOTE: there is still an (extreme) corner case where behavior is different between 2.93 and 3.0: If you append (at the same time) object A from LibA.blend, and object B from LibB.blend, and object B uses somehow a material from LibA.blend: * In 2.93, that material would have been made local (because it belonged to one of the 'initial' libraries, even though not the initial lib of object B). * In 3.0, this material will remain linked, since from object B persective it comes from a different library.
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r--source/blender/blenloader/BLO_readfile.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 4656bc64a1f..541483d4eed 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -220,7 +220,9 @@ typedef enum eBLOLibLinkFlags {
BLO_LIBLINK_NEEDS_ID_TAG_DOIT = 1 << 18,
/** Set fake user on appended IDs. */
BLO_LIBLINK_APPEND_SET_FAKEUSER = 1 << 19,
- /** Append (make local) also indirect dependencies of appended IDs. */
+ /** Append (make local) also indirect dependencies of appended IDs comming from other libraries.
+ * NOTE: All IDs (including indirectly linked ones) coming from the same initial library are
+ * always made local. */
BLO_LIBLINK_APPEND_RECURSIVE = 1 << 20,
/** Try to re-use previously appended matching ID on new append. */
BLO_LIBLINK_APPEND_LOCAL_ID_REUSE = 1 << 21,