This is a small feature wish. Having the possibility to see if a node(layer) is selected in the scripting API. Or getting a list of all selected nodes would be very handy. That way operations can be executed only on selected nodes.
Resolved in: https://commits.kde.org/krita/1a5a68a0b437e250d47308e887342ea93543649d
Git commit 1a5a68a0b437e250d47308e887342ea93543649d by Boudewijn Rempt. Committed on 21/02/2018 at 09:39. Pushed by rempt into branch 'master'. Scripting: add View::selectedNodes This returns a list of nodes selected in the given View. Note that it is possible for different views to have a different set of selected nodes, so being selected is not a property of the node. This also adds a utility class for libkis, so we can share some common code that doesn't need to be public. M +2 -0 libs/libkis/CMakeLists.txt A +81 -0 libs/libkis/LibKisUtils.cpp [License: LGPL (v2+)] A +34 -0 libs/libkis/LibKisUtils.h [License: LGPL (v2+)] M +5 -27 libs/libkis/Node.cpp M +14 -1 libs/libkis/View.cpp M +18 -1 libs/libkis/View.h M +2 -0 plugins/extensions/pykrita/sip/krita/View.sip https://commits.kde.org/krita/1a5a68a0b437e250d47308e887342ea93543649d