mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] Reconstruction: add clear methods
This commit is contained in:
parent
fe91d07a6a
commit
8020cf5158
1 changed files with 9 additions and 1 deletions
|
@ -453,6 +453,10 @@ class Reconstruction(UIGraph):
|
|||
|
||||
self.setDefaultPipeline(defaultPipeline)
|
||||
|
||||
def clear(self):
|
||||
self.clearActiveNodes()
|
||||
super(Reconstruction, self).clear()
|
||||
|
||||
def setDefaultPipeline(self, defaultPipeline):
|
||||
self._defaultPipeline = defaultPipeline
|
||||
|
||||
|
@ -463,6 +467,10 @@ class Reconstruction(UIGraph):
|
|||
for nodeType, _ in meshroom.core.nodesDesc.items():
|
||||
self._activeNodes.add(ActiveNode(nodeType, self))
|
||||
|
||||
def clearActiveNodes(self):
|
||||
for key in self._activeNodes.keys():
|
||||
self._activeNodes.get(key).node = None
|
||||
|
||||
def onCameraInitChanged(self):
|
||||
# Update active nodes when CameraInit changes
|
||||
nodes = self._graph.nodesFromNode(self._cameraInit)[0]
|
||||
|
@ -559,7 +567,7 @@ class Reconstruction(UIGraph):
|
|||
def getViewpoints(self):
|
||||
""" Return the Viewpoints model. """
|
||||
# TODO: handle multiple Viewpoints models
|
||||
return self._cameraInit.viewpoints.value if self._cameraInit else None
|
||||
return self._cameraInit.viewpoints.value if self._cameraInit else QObjectListModel(parent=self)
|
||||
|
||||
def updateCameraInits(self):
|
||||
cameraInits = self._graph.nodesByType("CameraInit", sortedByIndex=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue