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-08-16 19:37:51 +0300
committerBastien Montagne <bastien@blender.org>2022-08-16 19:39:47 +0300
commit669c924e07c1a363c805d36aca799fa11c5a80a8 (patch)
tree9a7d974bff08f7447d9cdff9dc0b280e930ca052
parent5f2667aa71168e54a3c75e14f7ef8050c1f282fb (diff)
Fix (unreported) bug in liboverride 'leaves' detection.
Loopback ID pointers should be ignored here as well, otherwise they are very efficient at preventing proper detection of 'leaf' override IDs in a hierarchy.
-rw-r--r--source/blender/blenkernel/intern/lib_override.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc
index 05a00fb54fd..58846aab4df 100644
--- a/source/blender/blenkernel/intern/lib_override.cc
+++ b/source/blender/blenkernel/intern/lib_override.cc
@@ -366,6 +366,10 @@ static int foreachid_is_hierarchy_leaf_fn(LibraryIDLinkCallbackData *cb_data)
ID *id = *cb_data->id_pointer;
bool *is_leaf = static_cast<bool *>(cb_data->user_data);
+ if (cb_data->cb_flag & IDWALK_CB_LOOPBACK) {
+ return IDWALK_RET_NOP;
+ }
+
if (id != nullptr && ID_IS_OVERRIDE_LIBRARY_REAL(id) &&
id->override_library->hierarchy_root == id_owner->override_library->hierarchy_root) {
*is_leaf = false;