Bug 345196 - Random animated brush repeats incrementally
Summary: Random animated brush repeats incrementally
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 2.9
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-16 01:24 UTC by Chris Jones
Modified: 2016-10-09 11:25 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 Chris Jones 2015-03-16 01:24:08 UTC
When creating an animated brush that is set to random, the images appear incrementally.

Reproducible: Always

Steps to Reproduce:
1. Create a 100 x 100 pixel image with 3 layers
2. Draw something different on each layer
3. Go to Edit Brush Settings > Stamp
4. Set the Style to Animated and Selection Mode to Random
5. Draw with the brush and note that the 3 images repeat in succession instead of randomly



This always happens initially, but eventually works properly after wrestling with it for a while.
Comment 1 Halla Rempt 2015-03-19 12:41:59 UTC
Hi Chris,

Yes, it looks like I can confirm the issue.
Comment 2 Halla Rempt 2016-10-09 11:25:34 UTC
Git commit 2c0bc2a25f793b7773af271a5d0695794b0d49d0 by Boudewijn Rempt.
Committed on 09/10/2016 at 11:20.
Pushed by rempt into branch 'master'.

Fix the randomness of KisRandomSource

The root cause probably was all the places where srand was called,
but after this change, textures are random again. This was a problem
on Windows only, probably because the resolution of time() is too
low. But that's a guess.
Related: bug 370246, bug 363663, bug 367873
Closed phabricator task T3887,T3968

M  +22   -5    libs/image/brushengine/kis_random_source.cpp

http://commits.kde.org/krita/2c0bc2a25f793b7773af271a5d0695794b0d49d0