Skip to content

Commit 0fab6df

Browse files
committed
[ui] Node documentation cleanup the code
1 parent 3302d18 commit 0fab6df

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

meshroom/core/node.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -757,14 +757,11 @@ def getNodeInfos(self):
757757
("modulePath", self.nodeDesc.plugin.path),
758758
])
759759
# Infos from the plugin module
760-
try:
761-
plugin_module = sys.modules[self.nodeDesc.__module__]
762-
if getattr(plugin_module, "__author__", None):
763-
infos["author"] = plugin_module.__author__
764-
if getattr(plugin_module, "__version__", None):
765-
infos["version"] = plugin_module.__version__
766-
except:
767-
pass
760+
plugin_module = sys.modules.get(self.nodeDesc.__module__)
761+
if getattr(plugin_module, "__author__", None):
762+
infos["author"] = plugin_module.__author__
763+
if getattr(plugin_module, "__version__", None):
764+
infos["version"] = plugin_module.__version__
768765
# Additional node infos
769766
# They can be stored in a __nodeInfo__ parameter
770767
# We can also use it to override variables here (like author or version)

meshroom/ui/qml/GraphEditor/NodeDocumentation.qml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ FocusScope {
3838
id: nodeInfoKey
3939
anchors.margins: 2
4040
color: Qt.darker(activePalette.window, 1.1)
41-
//Layout.preferredWidth: sizeHandle.x
4241
Layout.preferredWidth: nodeDocColumnLayout.keyColumnWidth
4342
Layout.minimumWidth: 0.2 * parent.width
4443
Layout.maximumWidth: 0.8 * parent.width
@@ -98,7 +97,6 @@ FocusScope {
9897
width: parent.width
9998
height: childrenRect.height
10099
Layout.preferredWidth: width
101-
// anchors.fill: parent
102100
spacing: 3
103101
model: node.nodeInfos
104102
delegate: nodeInfoItem
@@ -107,10 +105,10 @@ FocusScope {
107105
TextEdit {
108106
id: documentationText
109107
anchors.top: nodeInfoListView.bottom
108+
padding: 8
110109
topPadding: 15
111110
Layout.preferredWidth: width
112111
width: parent.parent.parent.width
113-
padding: 8
114112
textFormat: TextEdit.MarkdownText
115113
selectByMouse: true
116114
selectionColor: activePalette.highlight

0 commit comments

Comments
 (0)