GNOME Bugzilla – Bug 775134
mypaint-brush: Saved color in a brush isn't taken into account
Last modified: 2016-12-11 18:42:23 UTC
Created attachment 340797 [details] difference between a regular pencil and a red pencil It is possible in mypaint to save the current color in a brush so it switches to it automatically when the brush is selected, using the Save Color setting. The setting can have a value between 0 and 1 (where 0 keeps the previous color, 1 restores the brush's saved color, and any value between the two applies a hue of the saved color to the previous color depending on the value.) As the title says, in gimp, the color doesn't change with the mypaint brush regardless of that setting. I took a regular pencil brush from one of the default packs and modified it so it becomes a red pencil. I attached the result of the diff -u command between the two. Please let me know if there is anything else I should provide.
Here's the code that MyPaint uses for this setting, but this has to be implemented in GIMP if it isn't already. https://github.com/mypaint/mypaint/blob/0b7a3db6af146196c94b4b956a2957f0882e1c47/gui/brushmodifier.py#L203 It isn't necessarily the right way, or even especially nice code, sadly :(
Thanks. We'll have a look!
Adding 2.10 milestone. Because that would be good if that could be fixed by then (though that's not blocker level IMO).
This should fix it, but I didn't test. If you have such brushes, please check if it works and reopen if it doesn't. commit 350c6ca1f7a4c53f5a51933eae2c9bb7c9c0e649 Author: Michael Natterer <mitch@gimp.org> Date: Sun Dec 11 19:39:33 2016 +0100 Bug 775134 - mypaint-brush: Saved color in a brush isn't taken into account gimp_mybrush_core_create_brushes(): don't set the current FG or BG on the brush if its RESTORE_COLOR setting is 1.0 (TRUE). app/paint/gimpmybrushcore.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)