Bug 390818 - Get selected nodes or check if node is selected
Summary: Get selected nodes or check if node is selected
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 4.0.0-beta.1
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-20 21:56 UTC by Andreas
Modified: 2018-02-22 08:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2018-02-20 21:56:22 UTC
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.
Comment 2 Halla Rempt 2018-02-22 08:40:03 UTC
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