adding docstring for maintained selection

This commit is contained in:
Jakub Jezek 2023-10-17 16:19:34 +02:00
parent c8248dfc9c
commit b66a679ee2
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -2800,6 +2800,13 @@ def find_free_space_to_paste_nodes(
def maintained_selection(exclude_nodes=None):
"""Maintain selection during context
Maintain selection during context and unselect
all nodes after context is done.
Arguments:
exclude_nodes (list[nuke.Node]): list of nodes to be unselected
before context is done
Example:
>>> with maintained_selection():
... node["selected"].setValue(True)