I agree with tachiko haha - Not a surprise that I would like to see a feature request I made as a plugin
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!
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.
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.
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.
Thank you for this! I am happy that it was possible to map it to a key
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! This is probably a limitation with Krita?
Photoshop (Alt + Dragging it around leaving duplicates):
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
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.
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)
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.
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.
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…
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”)