diff --git a/meshroom/nodes/aliceVision/LdrToHdrSampling.py b/meshroom/nodes/aliceVision/LdrToHdrSampling.py index d9094484..7cd19ffb 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrSampling.py +++ b/meshroom/nodes/aliceVision/LdrToHdrSampling.py @@ -31,6 +31,7 @@ class DividedInputNodeSize(desc.DynamicNodeSize): def __init__(self, param, divParam): super(DividedInputNodeSize, self).__init__(param) self._divParam = divParam + def computeSize(self, node): s = super(DividedInputNodeSize, self).computeSize(node) divParam = node.attribute(self._divParam) diff --git a/meshroom/nodes/aliceVision/Split360Images.py b/meshroom/nodes/aliceVision/Split360Images.py index 456a5094..ccdfa7eb 100644 --- a/meshroom/nodes/aliceVision/Split360Images.py +++ b/meshroom/nodes/aliceVision/Split360Images.py @@ -2,8 +2,26 @@ __version__ = "3.0" from meshroom.core import desc + +class Split360InputNodeSize(desc.DynamicNodeSize): + ''' + The Split360Images will increase the amount of views in the SfMData. + This class converts the number of input views into the number of split output views. + ''' + def computeSize(self, node): + s = super(Split360InputNodeSize, self).computeSize(node) + factor = 0 + mode = node.attribute('splitMode') + if mode.value == 'equirectangular': + factor = node.attribute('equirectangularGroup.equirectangularNbSplits').value + elif mode.value == 'dualfisheye': + factor = 2 + return s * factor + + class Split360Images(desc.AVCommandLineNode): commandLine = 'aliceVision_split360Images {allParams}' + size = Split360InputNodeSize('input') category = 'Utils' documentation = "This node is used to extract multiple images from equirectangular or dualfisheye images."