Skip to content

Commit 03180b3

Browse files
Graph.paste_nodes() returns pasted node instances
1 parent 76a66fa commit 03180b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

NodeGraphQt/base/graph.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,6 +1788,9 @@ def cut_nodes(self, nodes=None):
17881788
def paste_nodes(self):
17891789
"""
17901790
Pastes nodes copied from the clipboard.
1791+
1792+
Returns:
1793+
list[NodeGraphQt.BaseNode]: list of pasted node instances.
17911794
"""
17921795
clipboard = QtWidgets.QApplication.clipboard()
17931796
cb_text = clipboard.text()
@@ -1806,6 +1809,7 @@ def paste_nodes(self):
18061809
nodes = self._deserialize(serial_data, relative_pos=True)
18071810
[n.set_selected(True) for n in nodes]
18081811
self._undo_stack.endMacro()
1812+
return nodes
18091813

18101814
def duplicate_nodes(self, nodes):
18111815
"""

0 commit comments

Comments
 (0)