https://bugs.kde.org/show_bug.cgi?id=506377
Bug ID: 506377
Summary: PyKrita scripting: severe issues creating multiple
selection masks reliably
Classification: Applications
Product: krita
Version First 5.2.9
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Scripting
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Description:
Using PyKrita scripting (Krita 5.2.9), I've observed the following severe
limitations:
1. Calling 'convert_to_selection_mask' always converts the original active base
layer, regardless of attempts to set the active node explicitly (via
`doc.setActiveNode()` or GUI actions like 'activateNextLayer').
2. Using global selection (`select_all` → setPixelData →
'add_new_selection_mask') allows creation of only one functioning selection
mask. Creating subsequent masks overwrites or clears selection pixels from
previously created masks, making multiple independent masks impossible.
3. Attempting to duplicate masks programmatically results in masks incorrectly
turning into base image layers or disappearing entirely from the layer stack.
These issues explicitly prevent reliable scripted creation of multiple
independent selection masks.
Expected Behavior:
- Allow explicit scripting-based activation of nodes so GUI actions affect
intended layers.
- Allow global selection-based creation of multiple independent selection masks
without overwriting previous selections.
- Provide clear and stable API methods to programmatically create and manage
selection masks independently.
Actual Behavior:
- GUI actions ignore scripting-based active node changes.
- Global selection state is transient, preventing stable multi-mask creation.
- Duplicating masks causes unintended layer-type conversions and deletions.
Reproduction steps and detailed test results available upon request.
--
You are receiving this mail because:
You are watching all bug changes.