[nodes] HDR Fusion: Don't send nbBrackets param for automatic detections

Reset the command line at every iteration to ensure that there is no
"--nbBrackets" leftovers when we are switching between the automatic
bracket detection and the manually specified brackets number.
This commit is contained in:
Candice Bentéjac 2023-07-18 17:53:06 +02:00
parent 26dee7379e
commit 6fe82a3000
3 changed files with 24 additions and 0 deletions

View file

@ -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