Refactor: Support library reloading without active scene pointer

In this case it will skip collection overrides sync, which is not needed
for brush asset reloading.
This commit is contained in:
Brecht Van Lommel
2024-05-17 17:41:19 +02:00
committed by Brecht Van Lommel
parent 80b3f9c6c1
commit 6c9c3cb69b

View File

@@ -2146,7 +2146,9 @@ void BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context,
BKE_library_main_rebuild_hierarchy(bmain);
/* Resync overrides if needed. */
if (!USER_EXPERIMENTAL_TEST(&U, no_override_auto_resync)) {
if (!USER_EXPERIMENTAL_TEST(&U, no_override_auto_resync) &&
lapp_context->params->context.scene != nullptr)
{
BlendFileReadReport report{};
report.reports = reports;
BKE_lib_override_library_main_resync(bmain,