mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
Update chunks with merge
This commit is contained in:
parent
a5a89d64ed
commit
d18cadc5ec
1 changed files with 27 additions and 1 deletions
|
@ -3,9 +3,35 @@ __version__ = "1.0"
|
|||
from meshroom.core import desc
|
||||
import os.path
|
||||
|
||||
|
||||
class MergeNodeSize(object):
|
||||
"""
|
||||
MergeNodeSize expresses a dependency to two input attributess to define
|
||||
the size of a Node in terms of individual tasks for parallelization.
|
||||
"""
|
||||
def __init__(self, param1, param2):
|
||||
self._param1 = param1
|
||||
self._param2 = param2
|
||||
|
||||
def computeSize(self, node):
|
||||
|
||||
size1 = 0
|
||||
size2 = 0
|
||||
|
||||
param1 = node.attribute(self._param1)
|
||||
if param1.isLink:
|
||||
size1 = param1.getLinkParam().node.size
|
||||
|
||||
param2 = node.attribute(self._param2)
|
||||
if param2.isLink:
|
||||
size2 = param2.getLinkParam().node.size
|
||||
|
||||
return size1 + size2
|
||||
|
||||
|
||||
class SfmMerge(desc.AVCommandLineNode):
|
||||
commandLine = 'aliceVision_sfmMerge {allParams}'
|
||||
size = desc.DynamicNodeSize('firstinput')
|
||||
size = MergeNodeSize('firstinput', 'secondinput')
|
||||
|
||||
category = 'Utils'
|
||||
documentation = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue