[nodes] ImageProcessing: define output values using lambda

This commit is contained in:
Fabien Castan 2020-06-28 16:03:00 +02:00
parent bbc56cfb31
commit a5131eec44

View file

@ -2,6 +2,8 @@ __version__ = "1.1"
from meshroom.core import desc
import os.path
class ImageProcessing(desc.CommandLineNode):
commandLine = 'aliceVision_utils_imageProcessing {allParams}'
@ -181,7 +183,7 @@ Convert or apply filtering to the input images.
name='outSfMData',
label='Output sfmData',
description='Output sfmData.',
value=desc.Node.internalFolder + 'sfmData.abc',
value=lambda attr: (desc.Node.internalFolder + 'sfmData' + os.path.splitext(attr.node.input.value)[1]) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '',
uid=[],
),
desc.File(
@ -192,4 +194,12 @@ Convert or apply filtering to the input images.
group='', # do not export on the command line
uid=[],
),
desc.File(
name='outputImages',
label='Output Images',
description='Output Image Files.',
value=lambda attr: desc.Node.internalFolder + '*.' + (attr.node.extension.value or '*'),
group='', # do not export on the command line
uid=[],
),
]