A small question to the Devs about patterns in default ressources

Hi Devs, I have a very questions about the app internal ressources. Why are all default patterns in the app twice included? Once in the app internal folder patterns (inside the app, not in the user folder) and once in the krita 4 default bundle? Is there a reason?
I just noticed it because all patterns are shown twice in the krita pattern library. Then I wanted to know why and opened the app files and then noticed this.

Thanks in advance

Have you tried the Krita 5/Krita Next/master? Or are you just using only the Krita 4 (latest stable/released) version?

I tried the latest stable release version 4.4.2 and the 5.0.0-prealpha 4cb4711 for macOS.

In the 4.4.2, after all patterns are showed once first, and after the whole list it repeats and shows all twice again (nearly all patterns, but not exactly all). In 5.0.0 it shows nearly all patterns twice immediately side by side.

I think this is maybe cause nearly all patterns are twice included in the app itself, once in the krita 4 default resource bundle file (81 patterns) and once in the app internal folder krita.app/Contents/Resouces/krita/patterns (112 patterns). And it looks like all 81 patterns from the default resource bundle are also in the patterns folder.

I don’t know if it is also twice in windows or linux build.

On the 4.4.2 appimage, I have three copies, one from the running temp folder (as I expect), one from the Krita_4 resources bundle and one from the Krita_3 resources bundle.
If I make those bundles inactive then those two copies go away, as expected.

I wonder why the Krita_4_Default_Resources bundle is included in a 4. series version.
The Krita_3_Default_Resources bundle contains some brush presets (and maybe brushes) that were removed from the 4. series and may be useful to people who still want to have them.

Yes the Krita 3 Default Bundle is also included in the app, but it is deactivated. And it shows two copies of patterns. Then you don’t have a patterns folder in the app image in linux with all the included 112 pattern files?

Is it possible to delete the copies in the pattern folder that are twice and move the other patterns that are not included in the bundles to the default resource bundle for the next krita versions?

I need to look into this in more detail because I appear to have ‘default’ patterns in my -/krita/patterns folder. I have 166 patterns in the Patterns docker when bundles are deactivated.
I don’t have time right now but I will go through this later.

Thank you very much, I just thought I’d mention it. I can imagine that all devs have quite a lot to do. :grimacing:

I’m sure they do and good luck with many thanks to them :slight_smile:

My first look was complicated by the fact that I had bundles in the -/krita/bundles folder (including an old Krita_3_Default bundle), I had personal patterns and had also been trying recent 5.0.0. builds, which have all sorts of new resources management things going on.
It was a mess in there.

Starting 4.4.2 with no resources folder gave me fresh resources and I had 186 patterns in the Patterns docker.

I then deactivated the Krita_3_Default and Krita_4_default bundles which resulted in 112 Patterns showing.
This also removed most of the brush presets.

I reactivated Krita_4_Default and had what appeared to be 198 patterns, some of half height, which was strange.

After a restart I had 186 patterns, with some duplicates.

I think we need to wait for the 5.0.0 resources rewrite to be completed.

https://invent.kde.org/graphics/krita/commit/c4c3cd6399331b77b938c179eb60a9bacc627739 hides duplicate resources: note that for resources to be duplicates, they have to absolutely the same contents. It’s still possible to have two patters with the same name that are not actual duplicates.

Thank you very much! Will this now be implemented as a fix in new versions?

It’ll be in the next nightly unstable build. All of this work is for Krita5.