From 44779f6f0ba9f89bcf3289edaf3083b2447dd6fe Mon Sep 17 00:00:00 2001 From: "Michael S. Root" <18869+mike1158@users.noreply.github.com> Date: Mon, 26 Aug 2019 09:37:53 -0700 Subject: [PATCH] Bugfix for MESHROOM_SUBMITTERS_PATH env variable Setting MESHROOM_SUBMITTERS_PATH caused meshroom to try to load the bundled simpleFarmSubmitter plugin twice, ignoring the path in the variable. I believe the problem lies with the way loadPlugins() works in meshroom.core, because it's trying to import the package name "submitters" more than once. The second time, import_module() just returns a reference to the This is a revised PR based on feedback from the first one I submitted last year, which went stale and then got erased as I was stumbling my way through git. --- meshroom/core/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/meshroom/core/__init__.py b/meshroom/core/__init__.py index 20b5f774c8..10467b565c 100644 --- a/meshroom/core/__init__.py +++ b/meshroom/core/__init__.py @@ -260,10 +260,7 @@ def loadSubmitters(folder, packageName): # - Nodes loadAllNodes(folder=os.path.join(meshroomFolder, 'nodes')) # - Submitters -subs = loadSubmitters(meshroomFolder, 'submitters') -# - additional 3rd party submitters -if "MESHROOM_SUBMITTERS_PATH" in os.environ: - subs += loadSubmitters(os.environ["MESHROOM_SUBMITTERS_PATH"], 'submitters') +subs = loadSubmitters(os.environ.get("MESHROOM_SUBMITTERS_PATH", meshroomFolder), 'submitters') for sub in subs: registerSubmitter(sub())