mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-16 08:15:19 +02:00
[core][ui] add upgradeAllNodes methods
+ check if node is upgradable in UpgradeNodeCommand
This commit is contained in:
parent
8679fd8bf7
commit
dd3d9cd54b
4 changed files with 54 additions and 0 deletions
|
@ -302,6 +302,14 @@ class UIGraph(QObject):
|
|||
""" Upgrade a CompatibilityNode. """
|
||||
self.push(commands.UpgradeNodeCommand(self._graph, node))
|
||||
|
||||
@Slot()
|
||||
def upgradeAllNodes(self):
|
||||
""" Upgrade all upgradable CompatibilityNode instances in the graph. """
|
||||
with self.groupedGraphModification("Upgrade all Nodes"):
|
||||
nodes = [n for n in self._graph._compatibilityNodes.values() if n.canUpgrade]
|
||||
for node in nodes:
|
||||
self.upgradeNode(node)
|
||||
|
||||
@Slot(Attribute, QJsonValue)
|
||||
def appendAttribute(self, attribute, value=QJsonValue()):
|
||||
if isinstance(value, QJsonValue):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue