diff --git a/meshroom/ui/app.py b/meshroom/ui/app.py index 38e1bcb17b..990d928be8 100644 --- a/meshroom/ui/app.py +++ b/meshroom/ui/app.py @@ -296,8 +296,7 @@ def markdownToHtml(self, md): return md return markdown(md) - @Property(QJsonValue, constant=True) - def systemInfo(self): + def _systemInfo(self): import platform import sys return { @@ -305,8 +304,9 @@ def systemInfo(self): 'python': 'Python {}'.format(sys.version.split(" ")[0]) } - @Property("QVariantList", constant=True) - def licensesModel(self): + systemInfo = Property(QJsonValue, _systemInfo, constant=True) + + def _licensesModel(self): """ Get info about open-source licenses for the application. Model provides: @@ -328,6 +328,7 @@ def licensesModel(self): } ] + licensesModel = Property("QVariantList", _licensesModel, constant=True) pipelineTemplateFilesChanged = Signal() recentProjectFilesChanged = Signal() pipelineTemplateFiles = Property("QVariantList", _pipelineTemplateFiles, notify=pipelineTemplateFilesChanged) diff --git a/meshroom/ui/reconstruction.py b/meshroom/ui/reconstruction.py index 78a9d6f92a..25ef55aefd 100755 --- a/meshroom/ui/reconstruction.py +++ b/meshroom/ui/reconstruction.py @@ -249,10 +249,8 @@ def _updateDenseSceneParams(self): self._undistortedImagePath = os.path.join(self._activeNode_PrepareDenseScene.node.output.value, filename) self.denseSceneParamsChanged.emit() - @Property(type=QObject, constant=True) - def attribute(self): - """ Get the underlying Viewpoint attribute wrapped by this Viewpoint. """ - return self._viewpoint + # Get the underlying Viewpoint attribute wrapped by this Viewpoint. + attribute = Property(QObject, lambda self: self._viewpoint, constant=True) @Property(type="QVariant", notify=initialParamsChanged) def initialIntrinsics(self):