This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Feature request: Clone brush preview

Tags: None
(comma "," separated)
CG3D
Registered Member
Posts
4
Karma
0
It would be awesome if Krita would show a preview-overlay of what the clone brush (or perhaps any other brush) is about to paint before it is actually invoked. That way, patterns or textures in the cloned result can be aligned to those in the original image.

The preview could be exactly like the brush would paint (at least up to a certain size maximum?), yet semi-transparent to differ it from the actual stroke when applied.

Photoshop and Affinity Photo have this feature and it works great with photos and textures.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
If I had a penny for every time someone tells us "application X has this, it would be awesome if Krita had it too", I would be pretty rich. If I would try to clone every feature in every application that anyone has ever asked me to clone, I wouldn't have time to work on anything Krita-specific -- heck, I wouldn't have time to sleep. And I would be bored to death when working on Krita.

In short, asking for a feature by telling me that it's awesome, and Photoshop has it, and it would be cool for photo's (which Krita isn't for) isn't convincing. If you want this feature: start looking into learning C++.

Here's an explanation with a bit more amplification: https://krita.org/en/item/ways-to-help- ... -requests/
CG3D
Registered Member
Posts
4
Karma
0
I started this topic with the intention to attenuate a gap in my workflow using Krita, hoping to find out if something similar is already being worked on or if other people like the clone brush to improve as well. It was not meant to convince anyone to lose sleep or be bored to death :). I was just hoping to get some response from like-minded (or not) people and then... who knows (I do speak some c++). Never mind, I doubt anyone will post a reaction in this topic now.

Also, besides 'telling you that it's awesome, and Photoshop has it, and it would be cool for photo's' (not what I said), I started out by telling what the idea is (aligning the result of the clone brush to the source) and how it could work (semi-transparent preview). No need to belittle. Sorry for misunderstanding this forum.
CG3D
Registered Member
Posts
4
Karma
0
"The clone brush is a brush engine that allows you to paint with a duplication of a section of a paint-layer.
This is useful in manipulation of photos and textures."

Krita 4.1 manual
CG3D
Registered Member
Posts
4
Karma
0
I checked out and built the Krita code using apt build-dep and kdesrc-build (nice ;D) to build the dependencies.
I found out that the preview-outline for the Clone Brush Engine is drawn in this function:
Code: Select all
QPainterPath KisDuplicateOpSettings::brushOutline(const KisPaintInformation &info, const OutlineMode &mode)

As far as I can tell the QPainterPath object returned does not provide a way to include a bitmap (preview of the Clone Brush Engine) to the brushOutline but only vector graphics. Furthermore, it draws the outline using KisBrushBasedPaintOpSettings::brushOutline() regardless of the settings in Settings -> Configure Krita -> General -> Cursor -> Outline Shape. This means that no bitmap preview can be drawn without improving / extending the current brush outline system :'( .

However, nosing around on the KDE Phabricator site I found the T7759 task (https://phabricator.kde.org/T7759) which involves improving on Krita's brush outline system. So I was thinking that maybe it would be possible to take bitmap drawing into consideration for T7759? Besides paving the way for a Clone Brush Engine preview, it could open up all kinds of possibilities for other Brush Engine preview modes as well...?

Anyway, since I cannot patch or extend the Clone Brush Engine for own use through any existing plugin or scripting API, I would like to ask you once more to consider adding such functionality to Krita. I could create a simple visual mock-up if anyone is interested. Thanks!
Saru
Registered Member
Posts
10
Karma
1
OS
i think it's possible to make i little hook in kis_tool_paint.cc @ KisToolPaint::requestUpdateOutline

It's a child of a Kotoolbase, you should be able to use the toolid() to test if the user selected the correct tool, and as for the current brush settings im not sure myself
good luck :D
User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS
I guess the dumbest questions are the ones never asked....
...but as far as versions...
Photoshop and Affinity Photo
In what versions did this feature first appear?




Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]