From 0bdad5a588d9c367e99b79021df350c30cfb6757 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Thu, 26 Oct 2017 16:10:14 +0200 Subject: [PATCH] [nodes] create default values from os.environ directly in nodes --- meshroom/multiview.py | 4 +--- meshroom/nodes/aliceVision/CameraInit.py | 3 ++- meshroom/nodes/aliceVision/ImageMatching.py | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/multiview.py b/meshroom/multiview.py index d09aab81..b81bd45f 100644 --- a/meshroom/multiview.py +++ b/meshroom/multiview.py @@ -6,14 +6,12 @@ from .core.graph import Graph def photogrammetryPipeline(): # type: () -> Graph graph = Graph('pipeline') - cameraInit = graph.addNewNode('CameraInit', - sensorDatabase=os.environ.get('ALICEVISION_SENSOR_DB', None)) + cameraInit = graph.addNewNode('CameraInit') featureExtraction = graph.addNewNode('FeatureExtraction', input=cameraInit.outputSfm) imageMatching = graph.addNewNode('ImageMatching', input=cameraInit.outputSfm, featuresDirectory=featureExtraction.output, - tree=os.environ.get('ALICEVISION_VOCTREE', None), ) featureMatching = graph.addNewNode('FeatureMatching', input=cameraInit.outputSfm, diff --git a/meshroom/nodes/aliceVision/CameraInit.py b/meshroom/nodes/aliceVision/CameraInit.py index d72cc95f..8fe6427f 100644 --- a/meshroom/nodes/aliceVision/CameraInit.py +++ b/meshroom/nodes/aliceVision/CameraInit.py @@ -1,4 +1,5 @@ import sys +import os from meshroom.core import desc @@ -24,7 +25,7 @@ class CameraInit(desc.CommandLineNode): sensorDatabase = desc.File( label='Sensor Database', description='''Camera sensor width database path.''', - value='', + value=os.environ.get('ALICEVISION_SENSOR_DB', ''), uid=[0], isOutput=False, ) diff --git a/meshroom/nodes/aliceVision/ImageMatching.py b/meshroom/nodes/aliceVision/ImageMatching.py index bc6ea3ec..1d365d94 100644 --- a/meshroom/nodes/aliceVision/ImageMatching.py +++ b/meshroom/nodes/aliceVision/ImageMatching.py @@ -1,4 +1,5 @@ import sys +import os from meshroom.core import desc @@ -23,7 +24,7 @@ class ImageMatching(desc.CommandLineNode): tree = desc.File( label='Tree', description='''Input name for the vocabulary tree file.''', - value='', + value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[0], isOutput=False, )