As both an artist and addon developer, I’m requesting a small but essential addition to the Krita Python API.
To improve what developers can do with non-destructive layer/file structure and interchange solutions; as well as for using Krita in more professional VFX pipelines. - This one API hook will unlock a lot of possibilities:
Node.users()– return a list of allCloneLayernodes that reference this node as their source.
Why This Matters
Currently, you can call clone.sourceNode() to find what a clone points to — but you cannot ask the source what is cloning it. That means:
- Artists can’t safely delete or modify a layer without risking breaking dependent clones.
- Developers have to manually scan the entire layer tree, checking every node to see if it’s a clone and if it matches a given source.
- Complex scenes with clone hierarchies are hard to reverse engineer (e.g., for export, asset cleanup, or prefab detection).
Real Problems This Solves
Find all instances of a reused object in a scene.
Clean up unreferenced sources or detect risky deletions.
Speed up exporters or plugins by avoiding full document scans.
Understand how a file is structured, especially when dealing with templates, prefabs, or multi-scene illustrations.
Performance & Practicality
For larger Krita files, especially production-ready ones, iterating all nodes just to find clone dependencies is:
- Inefficient (cost grows with document complexity)
- Redundant (Krita already tracks this internally)
- Error-prone (clone links can be broken, silent, or deferred)
Adding a simple users() method or signal would drastically reduce script overhead and let tooling be more intelligent — immediately.
Proposal Summary
Add:
python
clone_list = source_node.users() # returns all clone layers pointing to this node
Would make both artist workflows and plugin development faster, safer, and more intuitive.
Thanks for considering!
—Simon