mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 08:18:25 +02:00
Merge pull request #1861 from alicevision/mug/thumbnailCache
[ui] Thumbnail cache
This commit is contained in:
commit
334bfc8b00
4 changed files with 351 additions and 3 deletions
|
@ -16,6 +16,7 @@ from meshroom.ui import components
|
|||
from meshroom.ui.components.clipboard import ClipboardHelper
|
||||
from meshroom.ui.components.filepath import FilepathHelper
|
||||
from meshroom.ui.components.scene3D import Scene3DHelper, Transformations3DHelper
|
||||
from meshroom.ui.components.thumbnail import ThumbnailCache
|
||||
from meshroom.ui.palette import PaletteManager
|
||||
from meshroom.ui.reconstruction import Reconstruction
|
||||
from meshroom.ui.utils import QmlInstantEngine
|
||||
|
@ -116,6 +117,11 @@ class MeshroomApp(QApplication):
|
|||
pwd = os.path.dirname(__file__)
|
||||
self.setWindowIcon(QIcon(os.path.join(pwd, "img/meshroom.svg")))
|
||||
|
||||
# Initialize thumbnail cache:
|
||||
# - read related environment variables
|
||||
# - clean cache directory and make sure it exists on disk
|
||||
ThumbnailCache.initialize()
|
||||
|
||||
# QML engine setup
|
||||
qmlDir = os.path.join(pwd, "qml")
|
||||
url = os.path.join(qmlDir, "main.qml")
|
||||
|
@ -149,6 +155,7 @@ class MeshroomApp(QApplication):
|
|||
self.engine.rootContext().setContextProperty("Scene3DHelper", Scene3DHelper(parent=self))
|
||||
self.engine.rootContext().setContextProperty("Transformations3DHelper", Transformations3DHelper(parent=self))
|
||||
self.engine.rootContext().setContextProperty("Clipboard", ClipboardHelper(parent=self))
|
||||
self.engine.rootContext().setContextProperty("ThumbnailCache", ThumbnailCache(parent=self))
|
||||
|
||||
# additional context properties
|
||||
self.engine.rootContext().setContextProperty("_PaletteManager", PaletteManager(self.engine, parent=self))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue