diff --git a/meshroom/nodes/aliceVision/LdrToHdrMerge.py b/meshroom/nodes/aliceVision/LdrToHdrMerge.py index 3304670b..0b8811ce 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrMerge.py +++ b/meshroom/nodes/aliceVision/LdrToHdrMerge.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" import json @@ -47,26 +47,6 @@ class LdrToHdrMerge(desc.CommandLineNode): value='', uid=[0], ), - desc.IntParam( - name='offsetRefBracketIndex', - label='Offset Ref Bracket Index', - description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', - value=1, - range=(-4, 4, 1), - uid=[0], - ), - desc.ChoiceParam( - name='fusionWeight', - label='Fusion Weight', - description="Weight function used to fuse all LDR images together:\n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='gaussian', - values=['gaussian', 'triangle', 'plateau'], - exclusive=True, - uid=[0], - ), desc.IntParam( name='userNbBrackets', label='Number of Brackets', @@ -84,13 +64,35 @@ class LdrToHdrMerge(desc.CommandLineNode): range=(0, 10, 1), uid=[], ), + desc.IntParam( + name='offsetRefBracketIndex', + label='Offset Ref Bracket Index', + description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', + value=1, + range=(-4, 4, 1), + uid=[0], + enabled= lambda node: node.nbBrackets.value != 1, + ), desc.BoolParam( name='byPass', - label='bypass convert', + label='Bypass', description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], - advanced=True, + enabled= lambda node: node.nbBrackets.value != 1, + ), + desc.ChoiceParam( + name='fusionWeight', + label='Fusion Weight', + description="Weight function used to fuse all LDR images together:\n" + " * gaussian \n" + " * triangle \n" + " * plateau", + value='gaussian', + values=['gaussian', 'triangle', 'plateau'], + exclusive=True, + uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='channelQuantizationPower', @@ -100,6 +102,7 @@ class LdrToHdrMerge(desc.CommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.FloatParam( name='highlightCorrectionFactor', @@ -112,6 +115,7 @@ class LdrToHdrMerge(desc.CommandLineNode): value=1.0, range=(0.0, 1.0, 0.01), uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.FloatParam( name='highlightTargetLux', @@ -134,6 +138,7 @@ class LdrToHdrMerge(desc.CommandLineNode): value=120000.0, range=(1000.0, 150000.0, 1.0), uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/nodes/aliceVision/LdrToHdrSampling.py b/meshroom/nodes/aliceVision/LdrToHdrSampling.py index 5db4adf1..eeb27aaa 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrSampling.py +++ b/meshroom/nodes/aliceVision/LdrToHdrSampling.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" import json @@ -76,11 +76,12 @@ class LdrToHdrSampling(desc.CommandLineNode): ), desc.BoolParam( name='byPass', - label='bypass convert', + label='Bypass', description="Bypass HDR creation and use the medium bracket as the source for the next steps", value=False, uid=[0], group='internal', + enabled= lambda node: node.nbBrackets.value != 1, ), desc.IntParam( name='channelQuantizationPower', @@ -90,6 +91,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='blockSize', @@ -99,6 +101,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(8, 1024, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='radius', @@ -108,6 +111,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(0, 10, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='maxCountSample', @@ -117,6 +121,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(10, 1000, 10), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( name='debug', @@ -124,6 +129,7 @@ class LdrToHdrSampling(desc.CommandLineNode): description="Export debug files to analyze the sampling strategy.", value=False, uid=[], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name='verboseLevel', @@ -147,7 +153,7 @@ class LdrToHdrSampling(desc.CommandLineNode): ] def processChunk(self, chunk): - if chunk.node.byPass.value: + if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value: return super(LdrToHdrSampling, self).processChunk(chunk)