Created attachment 141774 [details] Screenshot of the database without the seexpr resource type entry SUMMARY I compiled kseexpr and installed it into Krita, and Krita's seexpr works, but the resources don't show up. Text in the console: "Adding to database failed, resource id after adding is -1 ! (Probable reason: the resource has the same filename, storage, resource type as an existing resource). Resource is: "Wolthera's_fractional_Brownian_Motion" "Wolthera's_fractional_Brownian_Motion.kse" "seexpr_scripts" "Krita_Artists_SeExpr_examples.bundle"" I believe the reason it cannot be added is because it cannot find an appropriate id for the seexpr resource type, and that's because the seexpr resource type is not available in the database at all. STEPS TO REPRODUCE 1. Remove your resource folder. 2. Use Krita that doesn't have seexpr (which is an optional dependency). See that there is no text on the console (because it considers the seexpr resources just broken). 3. Use Krita with seexpr. OBSERVED RESULT No seexpr scripts in the seexpr dialog. Warnings on the console about not being able to add seexpr scripts entries to the database. Seexpr script written by the user works (and actually, it even by default uses the last script the user wrote or used, I think?). EXPECTED RESULT Seexpr scripts resources are available in the seexpr dialog. NOTE If we figure out how to handle it nicely, it should help us add further resource types in the future. All of the new resource types will be in the same situation, after all (already existing database without that type in the resource_types table). The easy solution for this particular bug would be to just always add the seexpr entry even if Krita has no access to seexpr scripts, but maybe it could be handled better and handle an existing database without that entry already (and just add it). SOFTWARE/OS VERSIONS Krita Version: 5.1.0-prealpha (git 09aee17) Languages: en_US, en, en_US, en, en_US, en, pl_PL, pl, pl_PL, pl Hidpi: true Qt Version (compiled): 5.11.1 Version (loaded): 5.11.1
Created attachment 141775 [details] Screenshot showing an empty seexpr resource chooser
Git commit 6cfc02eb6fc7cb7454fa2e19e4ca8a0b3673cb92 by Halla Rempt. Committed on 22/09/2021 at 08:23. Pushed by rempt into branch 'master'. Add resource types that have been added since creating the cache db M +7 -0 libs/resources/KisResourceLocator.cpp https://invent.kde.org/graphics/krita/commit/6cfc02eb6fc7cb7454fa2e19e4ca8a0b3673cb92
Git commit 3434f57091eea6fae1f766b0cc2041f27f8554f7 by Halla Rempt. Committed on 22/09/2021 at 08:24. Pushed by rempt into branch 'krita/5.0'. Add resource types that have been added since creating the cache db (cherry picked from commit 6cfc02eb6fc7cb7454fa2e19e4ca8a0b3673cb92) M +7 -0 libs/resources/KisResourceLocator.cpp https://invent.kde.org/graphics/krita/commit/3434f57091eea6fae1f766b0cc2041f27f8554f7