From f7c7044823cdeb130da9c27f9441919cab675811 Mon Sep 17 00:00:00 2001 From: kielnino Date: Thu, 1 Feb 2024 09:25:10 +0100 Subject: [PATCH 1/2] remove unused mvs_tmp_dir --- stages/mvstex.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/stages/mvstex.py b/stages/mvstex.py index a45c3b179..eff47183e 100644 --- a/stages/mvstex.py +++ b/stages/mvstex.py @@ -108,13 +108,6 @@ def add_run(nvm_file, primary=True, band=None): 'labelingFile': '-L "%s"' % r['labeling_file'] if r['labeling_file'] else '' } - mvs_tmp_dir = os.path.join(r['out_dir'], 'tmp') - - # Make sure tmp directory is empty - if io.dir_exists(mvs_tmp_dir): - log.ODM_INFO("Removing old tmp directory {}".format(mvs_tmp_dir)) - shutil.rmtree(mvs_tmp_dir) - # run texturing binary system.run('"{bin}" "{nvm_file}" "{model}" "{out_dir}" ' '-d {dataTerm} -o {outlierRemovalType} ' From 10947ecddfc77d3b99d59eb5d6874105cd635987 Mon Sep 17 00:00:00 2001 From: kielnino Date: Thu, 1 Feb 2024 12:02:06 +0100 Subject: [PATCH 2/2] clarify usage of tmp directory --- stages/mvstex.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stages/mvstex.py b/stages/mvstex.py index eff47183e..6b4b64b12 100644 --- a/stages/mvstex.py +++ b/stages/mvstex.py @@ -108,6 +108,13 @@ def add_run(nvm_file, primary=True, band=None): 'labelingFile': '-L "%s"' % r['labeling_file'] if r['labeling_file'] else '' } + mvs_tmp_dir = os.path.join(r['out_dir'], 'tmp') + + # mvstex creates a tmp directory, so make sure it is empty + if io.dir_exists(mvs_tmp_dir): + log.ODM_INFO("Removing old tmp directory {}".format(mvs_tmp_dir)) + shutil.rmtree(mvs_tmp_dir) + # run texturing binary system.run('"{bin}" "{nvm_file}" "{model}" "{out_dir}" ' '-d {dataTerm} -o {outlierRemovalType} '