From 43d79304f9f72d29e86f902cbd93348325dac695 Mon Sep 17 00:00:00 2001 From: Frederic Devernay Date: Sat, 10 Jul 2021 18:55:45 -0700 Subject: [PATCH] AppManager: add open to clear OFX Plugin cache at launch --- Engine/AppManager.cpp | 7 ++++++- Tests/wmain.cpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Engine/AppManager.cpp b/Engine/AppManager.cpp index 05be6613d2..32fde4165f 100644 --- a/Engine/AppManager.cpp +++ b/Engine/AppManager.cpp @@ -1098,7 +1098,12 @@ AppManager::loadInternalAfterInitGui(const CLArgs& cl) _imp->restoreCaches(); } - setLoadingStatus( tr("Loading plugin cache...") ); + if (cl.isOpenFXCacheClearRequestedOnLaunch()) { + setLoadingStatus( tr("Clearing the OpenFX Plugins cache...") ); + clearPluginsLoadedCache(); + } else { + setLoadingStatus( tr("Loading plugin cache...") ); + } ///Set host properties after restoring settings since it depends on the host name. diff --git a/Tests/wmain.cpp b/Tests/wmain.cpp index 7abdf160f5..9cf3ccecdd 100755 --- a/Tests/wmain.cpp +++ b/Tests/wmain.cpp @@ -21,6 +21,7 @@ GTEST_API_ int main(int argc, char **argv) int argc = 0; QStringList args; args << QString::fromUtf8("--clear-cache"); + args << QString::fromUtf8("--clear-openfx-cache"); args << QString::fromUtf8("--no-settings"); CLArgs cl(args, true); if (!manager.load(argc, 0, cl)) {