GNOME Bugzilla – Bug 785001
Enhanced smudge tool: Smudge with painting
Last modified: 2018-03-30 12:18:35 UTC
Created attachment 355720 [details] [review] Enhanced-smudge-tool-Add-painting-ability-to-it I'm filing this bug as a favor to amphibulus on IRC so it can be tracked; I have no connection with the patch myself. It originally comes from here: https://mail.gnome.org/archives/gimp-developer-list/2017-June/msg00012.html There are three patch files which I will attach. Here's the text of the message: Use shark0r, this is the username I used on the internet. Another work was done. Patch (includes two patches I posted in April) https://drive.google.com/file/d/0ByvJcJmOQlkRQjNqcXkwRGw2UlU/view?usp=sharing Changes: --Besides current foreground color, now it supports color from gradients and color brushes. --In smudge tool's options -> Dynamics Options, add Color Options to control gradients. --Fit the coding standards. Their priority is the same as other paintbrush tools -If gradient is activated by brush dynamics, use gradient. -Else if current brush is a color brush, use its color. -Else it uses foreground colot. About this smudge painting tool the last work is "gimp-smudge" script procedure. And about optional and (IMO)less important ideas mentioned before, if no one has requirements, I will not work on them. --UI text suggestions. --Supports blend modes other than normal. (Difficult to implement) --Implement "No erasing effect"(Don't decrease alpha of existing pixels) as layer property.
Created attachment 355721 [details] [review] Add-No-erasing-effect-parameter-to-MyPaint-brush
Created attachment 355722 [details] [review] Smudge-painting-tool-Add-support-of-gradients
Thanks for filing the bug. The patches all need quite some cleanup, but will make it into 2.10.
Pushed the smudge patches as one patch, cleaned up: commit bcda53ee7b7725a078cc9033cfb3717659da360e Author: Michael Natterer <mitch@gimp.org> Date: Sat Jul 22 18:20:23 2017 +0200 Bug 785001 - Enhanced smudge tool: Smudge with painting Apply patches from shark0r that alow to mix in both constant and gradient color while smudging; and clean up the patches. app/gegl/gimp-gegl-loops.c | 159 +++++++++++++++++++++++++++++++++++++++++++-------------- app/gegl/gimp-gegl-loops.h | 16 +++--- app/paint/gimpsmudge.c | 141 +++++++++++++++++++++++++++++++++++--------------- app/paint/gimpsmudgeoptions.c | 44 +++++++++++++--- app/paint/gimpsmudgeoptions.h | 2 + app/tools/gimppaintoptions-gui.c | 3 +- app/tools/gimpsmudgetool.c | 13 ++++- 7 files changed, 284 insertions(+), 94 deletions(-)
I think interesting to have in this new Smudge tool also: 1. *Blend modes* enabled as other paint tools. 2. *Sample merged* option (as we have in the Clone tool). With color capability now is possible to think on Smudge tool also as normal paint tool. Provide the option to use blend on the smudge tool increase the possibilities to emulate interesting techniques on GIMP. Another useful and interesting feature is *Sample merged* (as is possible see on Clone Tool). This render possible to smudge paint on a blank transparent layer, pulling the the colors from the underlying visible layers. This would make it very easy to go back and correct or repaint according to changing artistic goals. I am not sure if is necessary open another bug report because the point number 2 request.
Hi, I am the original developer of this patch. Thanks for posting here and merging into the main stream. The "No erasing effect" of MyPaint brush was not included though, but at least I'll use that for personal use. Some additional details of this tool: details and test drawings https://www.gimp-forum.net/Thread-Customized-smudge-tool-Smudge-with-painting talking about UI text https://mail.gnome.org/archives/gimp-developer-list/2017-April/msg00011.html About jose americo gobbo's suggestions: 1. *Blend modes* enabled as other paint tools. I have studied it. It's difficult to implement because smudge tool calculates brush-to-drawable blending by itself, and doesn't use common approach of other brush tools. This may have benefits but needs many works. May need to reconstruct smudge tool's engine. 2. *Sample merged* option (as we have in the Clone tool). Havn't thought about this yet. May be easier to implement than 1.
I just didn't get to apply the other patch, the bug is still open :)
I hope you'll add to the smudge tool the fast ctrl+left_click shortcut to pick up the canvas color, in the same way as the paintbrush and the airbrush tool. ^^
Setting the bug to blocker for the release mostly because there is just a last patch to review (not even an old one so I expect it should still apply either cleanly or with minor changes only) so let's get this done.
And the last patch: commit 32280a170b2a109c0d60de14fa96561d094dd7b0 Author: shark0r <b91502038@ntu.edu.tw> Date: Wed Jan 3 02:18:02 2018 +0100 app: Add "No erasing effect" parameter to MyPaint brush Last and unrelated patch of bug #785001. app/paint/gimpmybrushcore.c | 3 ++- app/paint/gimpmybrushoptions.c | 16 +++++++++++++++- app/paint/gimpmybrushoptions.h | 1 + app/paint/gimpmybrushsurface.c | 17 ++++++++++++----- app/paint/gimpmybrushsurface.h | 11 ++++++----- app/tools/gimpmybrushoptions-gui.c | 5 +++++ 6 files changed, 41 insertions(+), 12 deletions(-)
...and one last thing, almost forgot about this: commit 119f648a76fa97b05606a2e3c6b76e9d09e8cb63 Author: Michael Natterer <mitch@gimp.org> Date: Wed Jan 3 02:29:33 2018 +0100 Bug 785001 - Enhanced smudge tool: Smudge with painting Enable color picking with Ctrl-Click in the smudge tool because it now uses the foreground color. app/tools/gimpsmudgetool.c | 3 +++ 1 file changed, 3 insertions(+)
I just studied about how to make color picking work a few days ago, but Michael Natterer just did it at the same time. Anyway, many thanks to everyone.
I forgot one thing: When painting the foreground color was not added to color history. Airbrush and Pencil achieve this by inheriting GimpPaintbrush class, and Ink and MyPaint Brush call gimp_palettes_add_color_history() directly. What method should Smudge tool use? Does Smudge tool share many common features with GimpPaintbrush?
Created attachment 370330 [details] [review] fix the color history issue I tried to implement color history feature by calling gimp_palettes_add_color_history() directly. I chose not to inherit GimpPaintbrush because GimpPaintbrush and GimpSmudge seemed to share few common features. For example, airbrush uses _gimp_paintbrush_motion() for painting, but smudge tool can't use this function because smudge tool has different mechanism from this function.
(In reply to shark0r from comment #6) > About jose americo gobbo's suggestions: > > 1. *Blend modes* enabled as other paint tools. > I have studied it. It's difficult to implement because smudge tool > calculates brush-to-drawable blending by itself, and doesn't use common > approach of other brush tools. > This may have benefits but needs many works. May need to reconstruct smudge > tool's engine. > > 2. *Sample merged* option (as we have in the Clone tool). > Havn't thought about this yet. May be easier to implement than 1. As this bug is now closed as FIXED, I guess adding "Blend modes" and "Sample merged" options to the smudge tool should be posted as new bug reports?
Yeah please, open new bug reports. Your patch will otherwise be forgotten soon and never reviewed otherwise (and that would be a shame). Thanks!