From 6076d66961e7fd688a6fbe4a2c615e45e7f6a7e1 Mon Sep 17 00:00:00 2001 From: gregoire-dl Date: Thu, 20 Jul 2023 10:41:05 +0200 Subject: [PATCH] [micmac] SaisieMasqQT: Update in/out parameters --- meshroomMicmac/micmac/SaisieMasqQT.py | 158 +++++++++++++++++--------- 1 file changed, 103 insertions(+), 55 deletions(-) diff --git a/meshroomMicmac/micmac/SaisieMasqQT.py b/meshroomMicmac/micmac/SaisieMasqQT.py index 5f9bd15..cb26e41 100644 --- a/meshroomMicmac/micmac/SaisieMasqQT.py +++ b/meshroomMicmac/micmac/SaisieMasqQT.py @@ -1,55 +1,103 @@ -__version__ = "1.1.1" - -from meshroom.core import desc -from meshroomMicmac.custom import node - -class SaisieMasqQT(node.MicmacNode): - commandLine = 'mm3d SaisieMasqQT {filePathValue} {allParams}' - documentation = '''SaisieMasqQT''' - - inputs = [ - desc.File( - name='projectDirectory', - label='Project Directory', - description='Project Directory.', - value="", - group='', # required to execute mm3d command line - uid=[0], - ), - desc.File( - name='filePath', - label='File Path', - description='''Path of the file to open (image or PLY or camera XML).''', - group='', # unnamed parameter - value="", - uid=[0], - ), - desc.GroupAttribute( - name='SzW', - label='Window Size', - description='''Window Size in pixels.''', - joinChar=",", - groupDesc=[ - desc.IntParam(name="x", label="x", description="", value=900, uid=[0], range=(100, 1920, 1)), - desc.IntParam(name="y", label="y", description="", value=700, uid=[0], range=(100, 1080, 1)), - ] - ), - desc.StringParam( - name='Post', - label='File Postfix', - description='''Output file postfix.''', - value="_Masq", - uid=[0], - ), - ] - - outputs = [ - desc.File( - name='output', - label='Output', - description='Output folder', - group='', - value=desc.Node.internalFolder, - uid=[], - ), - ] +__version__ = "1.1.1" + +from meshroom.core import desc +from meshroomMicmac.custom import node + +class SaisieMasqQT(node.MicmacNode): + commandLine = 'mm3d SaisieMasqQT {filePathValue} {allParams}' + documentation = '''SaisieMasqQT''' + + inputs = [ + desc.File( + name='projectDirectory', + label='Project Directory', + description='Project Directory.', + value="", + group='', # required to execute mm3d command line + uid=[0], + ), + desc.File( + name='filePath', + label='File Path', + description='''Path of the file to open (image or PLY or camera XML).''', + group='', # unnamed parameter + value="", + uid=[0], + ), + desc.BoolParam( + name='setPostfix', + label='Set Postfix', + description="Set postfix.", + uid=[0], + value=False, + group='', + advanced=True, + ), + desc.StringParam( + name='Post', + label='File Postfix', + description="Output file postfix.", + enabled=lambda node: node.setPostfix.value, + value="_Masq", + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='setName', + label='Set Name', + description="Set name.", + uid=[0], + value=False, + group='', + advanced=True, + ), + desc.StringParam( + name='Name', + label='Name', + description='''Set output filename (dafault=input+_Masq).''', + enabled=lambda node: node.setName.value, + value="", + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='setAttr', + label='Set Attr', + description="Set attr.", + uid=[0], + value=False, + group='', + advanced=True, + ), + desc.StringParam( + name='Attr', + label='Attr', + description='''String to add to postfix..''', + enabled=lambda node: node.setAttr.value, + value="", + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='setGamma', + label='Set Gamma', + description="Set gamma.", + uid=[0], + value=False, + group='', + advanced=True, + ), + desc.FloatParam( + name='Gama', + label='Gamma', + description='Apply gamma to image.', + enabled=lambda node: node.setGamma.value, + value=1.5, + range=(1.0, 4.0, 0.01), + uid=[0], + advanced=True, + ), + ] + + outputs = [ + ]