What plugins would you like to see?

Hello everyone we are marisol (@marisolcastrolopez) victor (@VicD17) and me, alberto.

We are looking to get started creating python plugins for Krita. So any ideas you would like to see please let us know.

We don’t promise to make them happen but that we will try :stuck_out_tongue: hahaha

9 Likes

a way to organize brushes: couple suggestions here:

4 Likes

I agree with tachiko haha - Not a surprise that I would like to see a feature request I made as a plugin :sweat_smile:
Thank you @tachiko for linking it!
And I wish you Marisol, Victor and Alberto good luck with your plugin coding adventure no matter what you guys make, I look forward to seeing it! :grin:

I don’t know if this is still worked on or not, but this is a feature that I want really badly and has been pretty silent lately: Having a visual change when in eraser mode (community poll)

Two more that I would love to see:

Quick duplication in current layer: Feature Request: Duplicate selected (in the same layer) - #12 by mmiller

Easy mass hiding and unhiding layers by drag and hold: we need click and drag on the eye icon to switch the visable status of the layer. - #11 by Snudl

1 Like

Hi Mario, Victor, and Albert,

Thank you for asking the community! It’s really sweet that you asked since you’re making planning on making plugins with the responses that you receive.

I don’t know if this counts as a plugin, but I would like a docker with a visual sound editor.

For example, the docker would have the ability for the artist to cut and trim sections of the audio to be able to animate only those sections, and to be able to visually see the sound as waves in the docker. In real time, for the two sections, since it would be nice to change the frame rate in the animation, making it slower or faster, and the audio would also be effected to be able to better sync the animations and sounds.

Thank you for your time!

1 Like

Isn’t this a feature in Krita 5? to paste into active layer? If you wanted to skip a step and just do a copy and paste in 1 command than it is simply:

Krita.instance().action('edit_copy').trigger()
Krita.instance().action('paste_into').trigger()

and you are done

Edit: if you want it a bit smarter then:

doc = Krita.instance().activeDocument()
if doc.selection() is not None:
    Krita.instance().action('edit_copy').trigger()
    Krita.instance().action('paste_into').trigger()

which will not copy and paste if there is no selection.

ShapesAndLayers already does this just an fyi

1 Like

I’m not sure the Python API provides a way to do this, but a way to quickly sample the canvas to create temporary RGBA bush tips would be nice, I think it would pretty much replicate the mixer brush in PS then.

So you would click on the canvas and the plugin would sample whatever is in the current brush stamp’s footprint ( or bounding box? Not sure which would be better) and dump that into an RGBA brushtip, which would then get overwritten the next time something was sampled.


Align images when moving them

1 Like

Well that escalated quickly.

1 Like

Thank you for this! I am happy that it was possible to map it to a key :grin:

The only problem is that it duplicates everything behind it each time, and ends up messier for each duplicate. I am very happy that you shared such a great script though! :blush: This is probably a limitation with Krita?
Photoshop (Alt + Dragging it around leaving duplicates):

Krita (Ctrl + Shift + 1 script shortcut duplicating it around):

Wow epic! :open_mouth: Haven’t heard of it, thank you, this is now one of my must-have plugins :grin:

It is duplicating the current selection, so if something else gets caught on the same layer withing the selection, then obviously that would happen.

If you want to do consecutive duplicates. Assign a shortcut for Paste into Active Layer

You probably just want to use “Paste” later instead of “Copy and Paste”.


Ok, considering the guys from the topic are not yet familiar with scripting, it might be a good idea to go through the list and point out items that are not really suitable for a plugin…

It’s all based on my own knmowledge, I guess there might be some tricks to make some of those happen, so if you disagree, please do tell me.

This is a good suggestion and can be made into a plugin.

That’s not good for a plugin, unfortunately. Which is a pity because what we learned from that experience is that everyone wants their own way for an eraser mode :smiley:

I don’t think this is possible as a plugin either, unless with messing around with events, which is not really a way I’d go about making a plugin.

Some of that would be possible as a docker if you try hard enough, but some (better syncing with animation), not really. Sound really needs to be done in c++. Cutting sound I guess could be in a docker, but then, it’s probably a somewhat large task.

It kinda should be possible but it wouldn’t be temporary, I think there should be a MR to make it possible to add the brush tips temporarily. There is a way in c++ but I don’t think there is one in Python yet.

I don’t think this is good for a plugin, it would be better as a c++ MR.


Basically, a good rule of thumb for what can be and what cannot be (or qould require various input/events cheating) a Python plugin is this:

  • plugins can do stuff
  • plugins can react to your shortcuts (shortcuts made specifically for that plugin)
  • plugins have only very limited info about what is happening, so making a plugin that does something in reaction to something happening is more difficult/impossible. You can see here what events Krita can inform the Python plugin about: libs/libkis/Notifier.h · master · Graphics / Krita · GitLab

Example of a plugin doing mostly stuff on its own: my Life Drawing Session plugin: Life Drawing Sessions plugin - version 0.9.1 (alpha) - update May 8th '20 which controls your layers and switches and creates them in time. Note it only reacts to time, not to anything happening on the screen.

Example of a plugin reacting to your shortcuts: Ten Brushes, Ten Scripts.

Example of a plugin doing input kidnapping (I guess?): Lazy Text Tool(Prototype) – A plugin that helps you type though of course if it works, then it works.

1 Like

It seems that there is no notification after creating a selection? I thought it was possible to implement a toolbar like csp, through buttons to perform various operations on the selection

In addition, I was reminded of the “repeat last transformation” operation, which creates regular images. This regular variation seems to work well with the plugin

It is possible to some extent, just you would have to play some tricks. Such as when the selection tool is picked. You can either set a timer to check for selection, filter out the mouse release event, or do your own selection overlay.

A simpler way though is that a selection mask is created when you do a selection. So monitor the layer list events and when you see a selection mask being created, you know there is a selection

Edit: Simple example:

from krita import *
from PyQt5 import QtWidgets

qwin = Krita.instance().activeWindow().qwindow()
layerBox = qwin.findChild(QtWidgets.QDockWidget, "KisLayerBox")
layerList = layerBox.findChild(QtWidgets.QTreeView,"listLayers")

def layerChange():
    doc = Krita.instance().activeDocument()
    if doc.selection() is not None:
        print ("SELECTION!")
    else:
        print ("NO SELECTION")


layerList.model().sourceModel().dataChanged.connect(layerChange)
layerList.model().sourceModel().modelReset.connect(layerChange)
layerList.model().sourceModel().rowsRemoved.connect(layerChange)
1 Like

I have had a wish bug for it here - 343072 – Ability to apply transformation again ( repeat last transformation) with a shortcut key

1 Like

Why not something simple first? My first plugin was a simple clock it was literally the basis for my other ones.

Or you can read the API in search of inspiration concerning a topic you like.

Also you can do alot with dockers that later can interact with krita. You can do whacky stuff also like a music player or something. Pyqt5 has some odd options.

2 Likes

I’d like to see a plug-in that lets you paint seamlessly with your mouse.

Kind of like this, for example:

I have always been looking for some kind of menu that was customizable, with the possibility of assigning to each key a krita function, without limitations, that is to say, that supports any action.

Something similar to the menus that comes with the Wacom driver for Windows, but for Linux users. The ideal would be a floating panel, which can be fixed or hidden, at the user’s choice. The closest I have found is Gnome Pie, directly from the repositories, or a plugin that I like but still somewhat limited, such as Pie menu. I also don’t like the circular shape, I would like a row or column of buttons, and something that is important to me, that the plugin works in “canvas only” mode.
Thank you. :slightly_smiling_face:

This topic on erasers has many people insisting on their own opinions, but they all agree that they are not satisfied with the status quo.
The reason this topic didn’t work out is probably because we had to unify our opinions to try to implement it as an official feature of Krita. I don’t see a problem with implementing any one of the ideas as an external plugin. (I’m thinking changing the color of the cursor with a pen in eraser mode would be a good idea.

Or is it difficult to implement any of the ideas in this topic by Python script? I’m a beginner in programming, so I don’t know much about it…

Translated with www.DeepL.com/Translator (free version)

1 Like

Hi

Most of idea here might be implemented as native Krita’s functionality:

  • Python API are not evolved enough to let Python plugin developer to implement things that will interact with canvas
  • Python is a slow interpreted language and the risk is, if API are opened to let a Python plugin to interact with canvas, to slow down Krita’s performances; and you can be sure in this case that users will complain about Krita and not about the plugin…

After, with Qt, it’s still possible to tweak things, but tweaks are tweaks and:

  • are source of bugs and unwanted behavior
  • can be not functional anymore at any time (especially if something change in Krita’s UI)

@tiar already gave an answer about which plugins can be (easily) made in Python.

Can add this one:

Not possible to do through a Python plugin.
There’s too much missing API

And can also add this one:

This one can be done.
There’s already a similar plugin ([plugin] Pie Menu v0.4) even if it’s not exactly what is asked here (especially because of “I also don’t like the circular shape”)

Grum999

2 Likes

…but but what’s wrong with circles? You a squarish fiend? :0