mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-29 08:56:33 +02:00
[nodes] ImageProcessing: bug fix and minor code simplification
This commit is contained in:
parent
67a87a5f09
commit
6888322adc
1 changed files with 16 additions and 10 deletions
|
@ -11,16 +11,22 @@ def outputImagesValueFunct(attr):
|
||||||
outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None
|
outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None
|
||||||
|
|
||||||
if inputExt in ['.abc', '.sfm']:
|
if inputExt in ['.abc', '.sfm']:
|
||||||
|
# If we have an SfM in input
|
||||||
return desc.Node.internalFolder + '*' + (outputExt or '.*')
|
return desc.Node.internalFolder + '*' + (outputExt or '.*')
|
||||||
elif inputExt :
|
|
||||||
|
if inputExt:
|
||||||
|
# if we have one or multiple files in input
|
||||||
return desc.Node.internalFolder + fileStem + (outputExt or inputExt)
|
return desc.Node.internalFolder + fileStem + (outputExt or inputExt)
|
||||||
else:
|
|
||||||
if '*' in fileStem:
|
if '*' in fileStem:
|
||||||
# Assume the input fileStem is a regular expression to files
|
# The fileStem of the input param is a regular expression,
|
||||||
|
# so even if there is no file extension,
|
||||||
|
# we consider that the expression represents files.
|
||||||
return desc.Node.internalFolder + fileStem + (outputExt or '.*')
|
return desc.Node.internalFolder + fileStem + (outputExt or '.*')
|
||||||
else:
|
|
||||||
# No extension mean it is a folder path
|
# No extension and no expression means that the input param is a folder path
|
||||||
return desc.Node.internalFolder + fileStem + '/' + (outputExt or '.*')
|
return desc.Node.internalFolder + '*' + (outputExt or '.*')
|
||||||
|
|
||||||
|
|
||||||
class ImageProcessing(desc.CommandLineNode):
|
class ImageProcessing(desc.CommandLineNode):
|
||||||
commandLine = 'aliceVision_utils_imageProcessing {allParams}'
|
commandLine = 'aliceVision_utils_imageProcessing {allParams}'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue