Skip to content

Commit

Permalink
computeSize for sfmMerge
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Jan 23, 2025
1 parent 8d2f0f7 commit f40c39c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions meshroom/nodes/aliceVision/SfMMerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,29 @@

import os.path

class MergeNodeSize(desc.DynamicNodeSize):
"""
MergeNodeSize expresses a dependency to multiple input attributess to define
the size of a Node in terms of individual tasks for parallelization.
"""
def __init__(self, param):
self._params = param

def computeSize(self, node):

size = 0

Check warning on line 18 in meshroom/nodes/aliceVision/SfMMerge.py

View check run for this annotation

Codecov / codecov/patch

meshroom/nodes/aliceVision/SfMMerge.py#L18

Added line #L18 was not covered by tests

for input in node.attribute(self._params).value:
paramName = input.getFullName()
param = node.attribute(paramName)
size = size + param.getLinkParam().node.size

Check warning on line 23 in meshroom/nodes/aliceVision/SfMMerge.py

View check run for this annotation

Codecov / codecov/patch

meshroom/nodes/aliceVision/SfMMerge.py#L20-L23

Added lines #L20 - L23 were not covered by tests

return size

Check warning on line 25 in meshroom/nodes/aliceVision/SfMMerge.py

View check run for this annotation

Codecov / codecov/patch

meshroom/nodes/aliceVision/SfMMerge.py#L25

Added line #L25 was not covered by tests


class SfMMerge(desc.AVCommandLineNode):
commandLine = 'aliceVision_sfmMerge {allParams}'
size = MergeNodeSize("inputs")

category = 'Utils'
documentation = '''
Expand Down

0 comments on commit f40c39c

Please sign in to comment.