mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
[nodes] LDR2HDR: resize dynamic node size based on groupSize param
This commit is contained in:
parent
9d78c7be32
commit
54a57a7d5e
1 changed files with 15 additions and 1 deletions
|
@ -6,9 +6,23 @@ import os
|
||||||
from meshroom.core import desc
|
from meshroom.core import desc
|
||||||
|
|
||||||
|
|
||||||
|
class DividedInputNodeSize(desc.DynamicNodeSize):
|
||||||
|
"""
|
||||||
|
The LDR2HDR will reduce the amount of views in the SfMData.
|
||||||
|
This class converts the number of LDR input views into the number of HDR output views.
|
||||||
|
"""
|
||||||
|
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)
|
||||||
|
return s / divParam.value
|
||||||
|
|
||||||
|
|
||||||
class LDRToHDR(desc.CommandLineNode):
|
class LDRToHDR(desc.CommandLineNode):
|
||||||
commandLine = 'aliceVision_convertLDRToHDR {allParams}'
|
commandLine = 'aliceVision_convertLDRToHDR {allParams}'
|
||||||
size = desc.DynamicNodeSize('input')
|
size = DividedInputNodeSize('input', 'groupSize')
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
desc.File(
|
desc.File(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue