Broken defaults

Silvio Heinrich plassy at
Sun Jun 26 17:25:07 CEST 2011

On 06/26/2011 01:58 PM, Lukast dev wrote:
> Hello,
> I would like to ask you if you know what broke the default preset in
> the brush editor. E.g. Experiment brush sets the defaults in
> constructor KisExperimentOpOptionsWidget
> but in the UI it is 0 (e.g. speed and displacement to 42). Also dyna
> brush is broken --
> currently I'm working on polishing brush engines (dyna brush will be
> eliminated, but I need to move some features to different brush
> engines) so I noticed this problem.
> Who knows what's wrong?

I've redesigned kis_paintop_box.* a while ago.
There was a lot of stuff completely wrong and inconsistent.
I'm afraid it doesn't work anymore to set defaults preset settings in 
the GUI (it doesn't belongs there anyway).
In kis_paintop_box.cpp is a method that retrieves the default preset 
settings for a PaintOp:

KisPaintOpPresetSP KisPaintopBox::defaultPreset(const KoID& paintOp)
     QString defaultName = + ".kpp";
     QString path        = 

     KisPaintOpPresetSP preset = new KisPaintOpPreset(path);

         return KisPaintOpRegistry::instance()->defaultPreset(paintOp, 

     return preset;

So, if you want a decent default preset you should either provide a 
default *.kpp file (and put it in the default preset directory) or you
have to make sure that 
KisPaintOpRegistry::instance()->defaultPreset(...) returns a decent 
preset for the given PaintOp :)

More information about the kimageshop mailing list