mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-21 21:16:29 +02:00
[nodes] update LdrToHdr nodes with enabled parameter
This commit is contained in:
parent
4e20286ac0
commit
f1af558603
2 changed files with 37 additions and 26 deletions
|
@ -1,4 +1,4 @@
|
||||||
__version__ = "2.0"
|
__version__ = "3.0"
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -47,26 +47,6 @@ class LdrToHdrMerge(desc.CommandLineNode):
|
||||||
value='',
|
value='',
|
||||||
uid=[0],
|
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(
|
desc.IntParam(
|
||||||
name='userNbBrackets',
|
name='userNbBrackets',
|
||||||
label='Number of Brackets',
|
label='Number of Brackets',
|
||||||
|
@ -84,13 +64,35 @@ class LdrToHdrMerge(desc.CommandLineNode):
|
||||||
range=(0, 10, 1),
|
range=(0, 10, 1),
|
||||||
uid=[],
|
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(
|
desc.BoolParam(
|
||||||
name='byPass',
|
name='byPass',
|
||||||
label='bypass convert',
|
label='Bypass',
|
||||||
description="Bypass HDR creation and use the medium bracket as the source for the next steps.",
|
description="Bypass HDR creation and use the medium bracket as the source for the next steps.",
|
||||||
value=False,
|
value=False,
|
||||||
uid=[0],
|
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(
|
desc.IntParam(
|
||||||
name='channelQuantizationPower',
|
name='channelQuantizationPower',
|
||||||
|
@ -100,6 +102,7 @@ class LdrToHdrMerge(desc.CommandLineNode):
|
||||||
range=(8, 14, 1),
|
range=(8, 14, 1),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
advanced=True,
|
advanced=True,
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
|
||||||
),
|
),
|
||||||
desc.FloatParam(
|
desc.FloatParam(
|
||||||
name='highlightCorrectionFactor',
|
name='highlightCorrectionFactor',
|
||||||
|
@ -112,6 +115,7 @@ class LdrToHdrMerge(desc.CommandLineNode):
|
||||||
value=1.0,
|
value=1.0,
|
||||||
range=(0.0, 1.0, 0.01),
|
range=(0.0, 1.0, 0.01),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
|
||||||
),
|
),
|
||||||
desc.FloatParam(
|
desc.FloatParam(
|
||||||
name='highlightTargetLux',
|
name='highlightTargetLux',
|
||||||
|
@ -134,6 +138,7 @@ class LdrToHdrMerge(desc.CommandLineNode):
|
||||||
value=120000.0,
|
value=120000.0,
|
||||||
range=(1000.0, 150000.0, 1.0),
|
range=(1000.0, 150000.0, 1.0),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value and node.highlightCorrectionFactor.value != 0,
|
||||||
),
|
),
|
||||||
desc.ChoiceParam(
|
desc.ChoiceParam(
|
||||||
name='verboseLevel',
|
name='verboseLevel',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
__version__ = "2.0"
|
__version__ = "3.0"
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -76,11 +76,12 @@ class LdrToHdrSampling(desc.CommandLineNode):
|
||||||
),
|
),
|
||||||
desc.BoolParam(
|
desc.BoolParam(
|
||||||
name='byPass',
|
name='byPass',
|
||||||
label='bypass convert',
|
label='Bypass',
|
||||||
description="Bypass HDR creation and use the medium bracket as the source for the next steps",
|
description="Bypass HDR creation and use the medium bracket as the source for the next steps",
|
||||||
value=False,
|
value=False,
|
||||||
uid=[0],
|
uid=[0],
|
||||||
group='internal',
|
group='internal',
|
||||||
|
enabled= lambda node: node.nbBrackets.value != 1,
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='channelQuantizationPower',
|
name='channelQuantizationPower',
|
||||||
|
@ -90,6 +91,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
|
||||||
range=(8, 14, 1),
|
range=(8, 14, 1),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
advanced=True,
|
advanced=True,
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='blockSize',
|
name='blockSize',
|
||||||
|
@ -99,6 +101,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
|
||||||
range=(8, 1024, 1),
|
range=(8, 1024, 1),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
advanced=True,
|
advanced=True,
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='radius',
|
name='radius',
|
||||||
|
@ -108,6 +111,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
|
||||||
range=(0, 10, 1),
|
range=(0, 10, 1),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
advanced=True,
|
advanced=True,
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='maxCountSample',
|
name='maxCountSample',
|
||||||
|
@ -117,6 +121,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
|
||||||
range=(10, 1000, 10),
|
range=(10, 1000, 10),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
advanced=True,
|
advanced=True,
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
|
||||||
),
|
),
|
||||||
desc.BoolParam(
|
desc.BoolParam(
|
||||||
name='debug',
|
name='debug',
|
||||||
|
@ -124,6 +129,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
|
||||||
description="Export debug files to analyze the sampling strategy.",
|
description="Export debug files to analyze the sampling strategy.",
|
||||||
value=False,
|
value=False,
|
||||||
uid=[],
|
uid=[],
|
||||||
|
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
|
||||||
),
|
),
|
||||||
desc.ChoiceParam(
|
desc.ChoiceParam(
|
||||||
name='verboseLevel',
|
name='verboseLevel',
|
||||||
|
@ -147,7 +153,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
|
||||||
]
|
]
|
||||||
|
|
||||||
def processChunk(self, chunk):
|
def processChunk(self, chunk):
|
||||||
if chunk.node.byPass.value:
|
if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value:
|
||||||
return
|
return
|
||||||
super(LdrToHdrSampling, self).processChunk(chunk)
|
super(LdrToHdrSampling, self).processChunk(chunk)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue