[ui][commands] expose UpgradeNode command

This commit is contained in:
Yann Lanthony 2018-07-15 13:30:45 +02:00
parent 1d309136ec
commit a18d75c0f9
2 changed files with 34 additions and 1 deletions

View file

@ -9,7 +9,7 @@ from PySide2.QtCore import Slot, QJsonValue, QObject, QUrl, Property, Signal
from meshroom.common.qt import QObjectListModel
from meshroom.core.attribute import Attribute, ListAttribute
from meshroom.core.graph import Graph, Edge, submitGraph, executeGraph
from meshroom.core.node import NodeChunk, Node, Status
from meshroom.core.node import NodeChunk, Node, Status, CompatibilityNode
from meshroom.ui import commands
@ -353,6 +353,11 @@ class UIGraph(QObject):
"""
return self.duplicateNodesFromNode(fromNode).values()
@Slot(CompatibilityNode)
def upgradeNode(self, node):
""" Upgrade a CompatibilityNode. """
self.push(commands.UpgradeNodeCommand(self._graph, node))
@Slot(Attribute, QJsonValue)
def appendAttribute(self, attribute, value=QJsonValue()):
if isinstance(value, QJsonValue):