mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-17 19:16:26 +02:00
Add node to graph with Ctrl+V if valid node content is in the clipboard
Attempt to paste the clipboard's content in the graph when Ctrl+V is pressed. If the clipboard contains a valid node description, add the corresponding node to the graph. Otherwise, do nothing.
This commit is contained in:
parent
751bad96c6
commit
ddda62a652
5 changed files with 80 additions and 0 deletions
|
@ -396,6 +396,15 @@ class Graph(BaseObject):
|
|||
|
||||
return duplicates
|
||||
|
||||
def pasteNode(self, nodeType, **kwargs):
|
||||
name = self._createUniqueNodeName(nodeType)
|
||||
node = None
|
||||
with GraphModification(self):
|
||||
node = Node(nodeType, **kwargs)
|
||||
self._addNode(node, name)
|
||||
self._applyExpr()
|
||||
return node
|
||||
|
||||
def outEdges(self, attribute):
|
||||
""" Return the list of edges starting from the given attribute """
|
||||
# type: (Attribute,) -> [Edge]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue