From 675438d331be5d310bb17fde25fa26bcba7b4194 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 9 Jun 2025 17:04:51 +0200 Subject: [PATCH] Fix: Append: Error message when appending liboverrides. Depending on things like order or processing etc., appending liboverrides data could generate error message in the console regarding invalid override hierarchy data. While this could probably be solved, it feels fairly brittle and risky to directly make linked liboverride hierarchies locale anyway, so just alsways make local copies of these on append. --- .../blender/blenkernel/intern/blendfile_link_append.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/blender/blenkernel/intern/blendfile_link_append.cc b/source/blender/blenkernel/intern/blendfile_link_append.cc index 810a19de46b..cc6fd27391c 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.cc +++ b/source/blender/blenkernel/intern/blendfile_link_append.cc @@ -1228,6 +1228,15 @@ static void blendfile_append_define_actions(BlendfileLinkAppendContext &lapp_con id->name); item.action = LINK_APPEND_ACT_COPY_LOCAL; } + else if (ID_IS_LINKED(id) && ID_IS_OVERRIDE_LIBRARY(id)) { + /* While in theory liboverrides can be directly made local, this causes complex potential + * problems, e.g. because hierarchy roots can become temporarily invalid when the root is + * made local, etc. + * + * So for now, simpler to always duplicate linked liboverrides. */ + CLOG_INFO(&LOG, 3, "Appended ID '%s' is a liboverride, duplicating it.", id->name); + item.action = LINK_APPEND_ACT_COPY_LOCAL; + } else { /* That last action, making linked data directly local, can still be changed to * #LINK_APPEND_ACT_COPY_LOCAL in the last checks below. This can happen in rare cases with