mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-23 11:37:28 +02:00
Merge pull request #2443 from alicevision/dev/accessCurrentFrame
Provide access to the current frame from the graph
This commit is contained in:
commit
6b10c24f32
2 changed files with 9 additions and 0 deletions
|
@ -226,6 +226,8 @@ class Graph(BaseObject):
|
||||||
self._fileDateVersion = 0
|
self._fileDateVersion = 0
|
||||||
self.header = {}
|
self.header = {}
|
||||||
|
|
||||||
|
self._selectedViewpoint = None
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
self.header.clear()
|
self.header.clear()
|
||||||
self._compatibilityNodes.clear()
|
self._compatibilityNodes.clear()
|
||||||
|
@ -1564,6 +1566,12 @@ class Graph(BaseObject):
|
||||||
self.updateStatusFromCache(force=True)
|
self.updateStatusFromCache(force=True)
|
||||||
self.cacheDirChanged.emit()
|
self.cacheDirChanged.emit()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def selectedViewpoint(self):
|
||||||
|
""" Return the attribute describing the viewpoint that is
|
||||||
|
currently set as the 'selected viewpoint'. """
|
||||||
|
return self._selectedViewpoint
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def fileDateVersion(self):
|
def fileDateVersion(self):
|
||||||
return self._fileDateVersion
|
return self._fileDateVersion
|
||||||
|
|
|
@ -1158,6 +1158,7 @@ class Reconstruction(UIGraph):
|
||||||
# Reconstruction has ownership of Viewpoint object - destroy it when not needed anymore
|
# Reconstruction has ownership of Viewpoint object - destroy it when not needed anymore
|
||||||
self._selectedViewpoint.deleteLater()
|
self._selectedViewpoint.deleteLater()
|
||||||
self._selectedViewpoint = ViewpointWrapper(viewpointAttribute, self) if viewpointAttribute else None
|
self._selectedViewpoint = ViewpointWrapper(viewpointAttribute, self) if viewpointAttribute else None
|
||||||
|
self._graph._selectedViewpoint = self._selectedViewpoint.attribute if viewpointAttribute else None
|
||||||
self.selectedViewpointChanged.emit()
|
self.selectedViewpointChanged.emit()
|
||||||
|
|
||||||
def setPickedViewId(self, viewId):
|
def setPickedViewId(self, viewId):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue