Bug 322229 - [brush preset] 'Scale' parameters of 'bitmap brush mask' is not saved or loaded anymore
Summary: [brush preset] 'Scale' parameters of 'bitmap brush mask' is not saved or load...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-11 09:49 UTC by David REVOY
Modified: 2013-09-01 13:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2013-07-11 09:49:53 UTC
The bug concern presets using a bitmap brush mask as the tip of brush. ( Brush editor, 'Brush Tip' , 'Predefined Brush'  bimap on the library are here ).  It's not a new bug, it's around since long time. The 'Scale' parameters of bitmap brush mask ( ex;  'pixel brush' engine, or 'color-smudge' ) react weirdly :
- Krita save the scale value on a Krita session automatically.
- Scale is reset at opening of a new Krita session to default size of bitmap ( Scale = 1.0 )
- Saving preset doesn't affect the scale value.

>> Scenarios :
1)
- User got Preset(A) using a 500x500px brush tip bitmap at Scale 1.0
- When painting, user play on the brush 'size'  ( Shift or Toolbar slider ) ; this one affect proportionnaly the 'Scale' parameter. Brush is half size, Scale will be at 0.5
- User switch to another Preset(xyz) paint, then go back to Preset(A) --> Scale is 'saved in memory' at 0.5 [ *bug*, if the preset specify Scale 1.0, it should be 1.0 ]

2)
- User still got Preset(A) using a 500x500px brush tip bitmap at Scale 1.0
- User change the scale ( ex : 0.3 ) , and overwrite the preset because he like the new aspect
- During the session, user switch to another Preset(xyz) then go back to Preset(A) , [bug described in (1) gives him the feeling his preset is saved correctly]. 
- User close Krita
- User open a new Krita , select Preset(A) ; Scale will be at 1.0 [ *bug*, if the preset was saved at Scale 0.3, it should be 0.3 ]
Comment 1 Halla Rempt 2013-07-20 12:19:29 UTC
Do you remember whether this actually ever worked before?
Comment 2 David REVOY 2013-07-20 13:04:12 UTC
Hard to know when it broke  ; I suppose more than 3 month ago. 
All my previous brushkit presets used different 'bitmap brush mask/Predefined brush' files ; so I thought a sort of autosave of brush size was implented and I was fine. 
Now my new brush presets sometimes use the same   'bitmap brush mask/Predefined brush' files for 3 presets ; and I could only check recently the 3 presets shared the same size.
Comment 3 David REVOY 2013-08-27 17:07:19 UTC
This bug also affect the 'rotation' setting of 'Predefined Brush' ,  also not saved into *.kpp
Comment 4 Dmitry Kazakov 2013-09-01 10:15:34 UTC
Git commit be12027fdd7e291a0760c2d4e29abd398c44eab2 by Dmitry Kazakov.
Committed on 01/09/2013 at 10:10.
Pushed by dkazakov into branch 'master'.

Fixed loading of Scale and Rotate of the predefined brushes

This patch also removes a significant portion of outdated code.

M  +1    -4    krita/plugins/paintops/libbrush/CMakeLists.txt
D  +0    -47   krita/plugins/paintops/libbrush/kis_abr_brush_factory.cpp
D  +0    -58   krita/plugins/paintops/libbrush/kis_abr_brush_factory.h
M  +6    -8    krita/plugins/paintops/libbrush/kis_brush_registry.cpp
M  +2    -2    krita/plugins/paintops/libbrush/kis_gbr_brush.cpp
D  +0    -58   krita/plugins/paintops/libbrush/kis_gbr_brush_factory.h
M  +2    -4    krita/plugins/paintops/libbrush/kis_png_brush.cpp
M  +0    -3    krita/plugins/paintops/libbrush/kis_png_brush.h
D  +0    -45   krita/plugins/paintops/libbrush/kis_png_brush_factory.cpp
R  +17   -17   krita/plugins/paintops/libbrush/kis_predefined_brush_factory.cpp [from: krita/plugins/paintops/libbrush/kis_gbr_brush_factory.cpp - 071% similarity]
R  +11   -28   krita/plugins/paintops/libbrush/kis_predefined_brush_factory.h [from: krita/plugins/paintops/libbrush/kis_png_brush_factory.h - 054% similarity]
M  +2    -4    krita/plugins/paintops/libbrush/kis_svg_brush.cpp
M  +0    -3    krita/plugins/paintops/libbrush/kis_svg_brush.h
D  +0    -45   krita/plugins/paintops/libbrush/kis_svg_brush_factory.cpp
D  +0    -58   krita/plugins/paintops/libbrush/kis_svg_brush_factory.h

http://commits.kde.org/calligra/be12027fdd7e291a0760c2d4e29abd398c44eab2
Comment 5 David REVOY 2013-09-01 13:09:07 UTC
Many thanks Dmitry ! This report was on my top bugs of Krita master.
I'll test it, but for the moment I'm stuck on Git master ( to this log , http://quickgit.kde.org/?p=calligra.git&a=commit&h=5611c5ce3f7079b5c84826943384019776d7ad69 , because of bug 323489 affecting my install ; https://bugs.kde.org/show_bug.cgi?id=323489 ). I'll test this as soon as I'll can update back to Git master.