Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix meshroom_batch #1521

Merged
merged 3 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion meshroom/core/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ def findNode(self, nodeExpr):
return candidates[0]

def findNodes(self, nodesExpr):
return [self.findNode(nodeName) for nodeName in nodesExpr]
if isinstance(nodesExpr, list):
return [self.findNode(nodeName) for nodeName in nodesExpr]
return [self.findNode(nodesExpr)]

def edge(self, dstAttributeName):
return self._edges.get(dstAttributeName)
Expand Down
10 changes: 5 additions & 5 deletions meshroom/core/taskManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def checkNodesDependencies(self, graph, toNodes, context):
raise ValueError("Argument 'context' must be: 'COMPUTATION' or 'SUBMITTING'")

if len(ready) + len(computed) != len(toNodes):
toNodes.clear()
del toNodes[:] # for python 2 compatibility, else use: toNodes.clear()
toNodes.extend(ready)
return False

Expand All @@ -367,7 +367,7 @@ def raiseImpossibleProcess(self, context):
raise RuntimeError("[{}] Impossible Process:\n"
"There is no node able to be processed.".format(context))

def submit(self, graph=None, submitter=None, toNodes=None):
def submit(self, graph, submitter=None, toNodes=None):
"""
Nodes are send to the renderfarm
:param graph:
Expand Down Expand Up @@ -395,6 +395,7 @@ def submit(self, graph=None, submitter=None, toNodes=None):

# Update task manager's lists
self.updateNodes()
graph.update()

# Check dependencies of toNodes
if not toNodes:
Expand Down Expand Up @@ -440,8 +441,7 @@ def submitFromFile(self, graphFile, submitter, toNode=None):
Submit the given graph via the given submitter.
"""
graph = meshroom.core.graph.loadGraph(graphFile)
toNodes = graph.findNodes([toNode]) if toNode else None
self.submit(graph, submitter, toNodes)
self.submit(graph, submitter, toNode)

def getAlreadySubmittedChunks(self, nodes):
"""
Expand All @@ -458,4 +458,4 @@ def getAlreadySubmittedChunks(self, nodes):
return out

nodes = Property(BaseObject, lambda self: self._nodes, constant=True)
restartRequested = Signal()
restartRequested = Signal()
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def createViewpointsFile(self, node, additionalViews=()):
"featureFolder": "",
"matchingFolder": "",
}
node.viewpointsFile = (node.nodeDesc.internalFolder + '/viewpoints.sfm').format(**node._cmdVars)
node.viewpointsFile = os.path.join(node.nodeDesc.internalFolder, 'viewpoints.sfm').format(**node._cmdVars)
with open(node.viewpointsFile, 'w') as f:
json.dump(sfmData, f, indent=4)

Expand Down
5 changes: 0 additions & 5 deletions meshroom/ui/qml/ImageGallery/ImageGallery.qml
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ Panel {
sortedModel.filterValue = value
grid.updateCurrentIndexFromSelectionViewId()
grid.updateSelectedViewFromGrid = true
}
onFilterRoleChanged: {
grid.makeCurrentItemVisible()
}
onFilterValueChanged: {
grid.makeCurrentItemVisible()
}

Expand Down