diff --git a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py index ef5a6c55..5093d4fd 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py @@ -69,6 +69,7 @@ Calibrate LDR to HDR response curve from samples. value=0, range=(0, 10, 1), uid=[0], + group="bracketsParams" ), desc.BoolParam( name="byPass", @@ -163,6 +164,12 @@ Calibrate LDR to HDR response curve from samples. def processChunk(self, chunk): if chunk.node.nbBrackets.value == 1: return + # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. + # Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic + # or if it was hard-set by the user. + self.commandLine = "aliceVision_LdrToHdrCalibration {allParams}" + if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value: + self.commandLine += "{bracketsParams}" super(LdrToHdrCalibration, self).processChunk(chunk) @classmethod diff --git a/meshroom/nodes/aliceVision/LdrToHdrMerge.py b/meshroom/nodes/aliceVision/LdrToHdrMerge.py index b86d46b9..1cae31c6 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrMerge.py +++ b/meshroom/nodes/aliceVision/LdrToHdrMerge.py @@ -68,6 +68,7 @@ Merge LDR images into HDR images. value=0, range=(0, 10, 1), uid=[0], + group="bracketsParams" ), desc.BoolParam( name="offsetRefBracketIndexEnabled", @@ -358,3 +359,12 @@ Merge LDR images into HDR images. node.nbBrackets.value = bestBracketSize else: node.nbBrackets.value = 0 + + def processChunk(self, chunk): + # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. + # Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic + # or if it was hard-set by the user. + self.commandLine = "aliceVision_LdrToHdrMerge {allParams}" + if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value: + self.commandLine += "{bracketsParams}" + super(LdrToHdrMerge, self).processChunk(chunk) diff --git a/meshroom/nodes/aliceVision/LdrToHdrSampling.py b/meshroom/nodes/aliceVision/LdrToHdrSampling.py index 443e93a9..fb62a6ef 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrSampling.py +++ b/meshroom/nodes/aliceVision/LdrToHdrSampling.py @@ -79,6 +79,7 @@ Sample pixels from Low range images for HDR creation. value=0, range=(0, 10, 1), uid=[0], + group="bracketsParams" ), desc.BoolParam( name="byPass", @@ -184,6 +185,12 @@ Sample pixels from Low range images for HDR creation. def processChunk(self, chunk): if chunk.node.nbBrackets.value == 1: return + # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. + # Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic + # or if it was hard-set by the user. + self.commandLine = "aliceVision_LdrToHdrSampling {allParams}" + if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value: + self.commandLine += "{bracketsParams}" super(LdrToHdrSampling, self).processChunk(chunk) @classmethod