Skip to content

Commit 95c9c45

Browse files
committed
[ui] NodeDocumentation : Add author and version overrides at the node level
1 parent 318f2f1 commit 95c9c45

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

meshroom/core/node.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -756,17 +756,20 @@ def getNodeInfos(self):
756756
("module", self.nodeDesc.__module__),
757757
("modulePath", self.nodeDesc.plugin.path),
758758
])
759-
# Infos from the plugin module
759+
# > Infos from the plugin module
760760
plugin_module = sys.modules.get(self.nodeDesc.__module__)
761761
if getattr(plugin_module, "__author__", None):
762762
infos["author"] = plugin_module.__author__
763763
if getattr(plugin_module, "__license__", None):
764764
infos["license"] = plugin_module.__license__
765765
if getattr(plugin_module, "__version__", None):
766766
infos["version"] = plugin_module.__version__
767-
# Additional node infos
768-
# They can be stored in a __nodeInfo__ parameter
769-
# We can also use it to override variables here (like author or version)
767+
# > Overrides at the node-level
768+
if getattr(self.nodeDesc, "author", None):
769+
infos["author"] = self.nodeDesc.author
770+
if getattr(self.nodeDesc, "version", None):
771+
infos["version"] = self.nodeDesc.version
772+
# > Additional node infos stored in a __nodeInfo__ parameter
770773
additionalNodeInfos = getattr(self.nodeDesc, "__nodeInfo__", None)
771774
if additionalNodeInfos:
772775
for key, value in additionalNodeInfos:

meshroom/ui/qml/GraphEditor/NodeDocumentation.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ FocusScope {
104104

105105
TextEdit {
106106
id: documentationText
107-
anchors.top: nodeInfoListView.bottom
108107
padding: 8
109-
topPadding: 15
108+
topPadding: 20
109+
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
110110
Layout.preferredWidth: width
111111
width: parent.parent.parent.width
112112
textFormat: TextEdit.MarkdownText

0 commit comments

Comments
 (0)