Bug 518266 - When random offsets are enabled, every stroke resets both horizontal and vertical offsets to zero
Summary: When random offsets are enabled, every stroke resets both horizontal and vert...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (other bugs)
Version First Reported In: 5.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-28 16:45 UTC by d.decent693
Modified: 2026-04-02 13:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description d.decent693 2026-03-28 16:45:58 UTC
There are two scenarios of how that bug can be reproduced:

1. Take any brush, enable random offset and make a stroke. You should see that the offsets reset to zero, even when manually setting them.

2. When having a brush, which already has random offsets enabled - for example a "memileo 01 Brush - Flat Tip" brush (from Memileo brush pack, which you can find here - https://krita-artists.org/t/memileo-impasto-brushes/92952). So when making a stroke with that brush without any modifications, random offsets work as expected, but when modifying any option and making a stroke, it resets to zero (for both offsets).

The interesting part is that, I tried to import my own brushes which had enabled random offsets, but random offsets didn't work from the start. So to see the bug, modifications were not needed. That brush pack, I created with the 5.2.14 version. I also had another brush pack which was created by me, but which was created even earlier than the 5.2.14 version (I don't remember the exact version), and those brushes work as expected, provided that not a single option had been changed after the importing, but after changing any option the bug appears.

Memileo Impasto Brushes were created with some older version of Krita, so I guess that is why they work too (if not modified). Also, when you reload that brush after the modification, random offsets work normaly again for Memileo and my brushes, which were created with some older versions.

Please tell me if I can provide more information.
Comment 1 Ahab Greybeard 2026-04-02 03:34:23 UTC
I can Confirm this for the 5.3.1 appimage during 'Scenario 1' as described by the OP.
With 5.2.16 and previous versions, the offset value varies randomly with each stroke, as can be seen in the Brush Editor.

I haven't tried 'Scenario 2'.
Comment 2 Dmitry Kazakov 2026-04-02 13:58:39 UTC
Git commit e40676a3022971d6865d5ded099865ebb4056454 by Dmitry Kazakov.
Committed on 02/04/2026 at 13:58.
Pushed by dkazakov into branch 'master'.

Fix brush offset being reset on every stroke

We should correctly use per-stroke random source
instead of changing the value in the model in an
ad-hoc manner.

M  +3    -43   libs/image/brushengine/kis_paintop_settings.cpp
M  +0    -7    libs/image/brushengine/kis_paintop_settings.h
M  +25   -6    plugins/paintops/libpaintop/kis_texture_option.cpp
M  +4    -0    plugins/paintops/libpaintop/kis_texture_option.h

https://invent.kde.org/graphics/krita/-/commit/e40676a3022971d6865d5ded099865ebb4056454
Comment 3 Dmitry Kazakov 2026-04-02 13:58:55 UTC
Git commit 99ea7343866a7a594a118868d61c757a9e01fdeb by Dmitry Kazakov.
Committed on 02/04/2026 at 13:58.
Pushed by dkazakov into branch 'krita/6.0'.

Fix brush offset being reset on every stroke

We should correctly use per-stroke random source
instead of changing the value in the model in an
ad-hoc manner.

M  +3    -43   libs/image/brushengine/kis_paintop_settings.cpp
M  +0    -7    libs/image/brushengine/kis_paintop_settings.h
M  +25   -6    plugins/paintops/libpaintop/kis_texture_option.cpp
M  +4    -0    plugins/paintops/libpaintop/kis_texture_option.h

https://invent.kde.org/graphics/krita/-/commit/99ea7343866a7a594a118868d61c757a9e01fdeb