SUMMARY The python API for resources returns an empty list when it should return a list of all resources of the corresponding type specified. Most certainly related to the ongoing resources rewrite. STEPS TO REPRODUCE 1. Run krita build where "RESOURCES REWRITE GOING ON" is displayed in the view title bar, probably any unstable git master build 2. Open Tool->Scripter and type ```print(Application.resources("preset"))``` 3. Click Run OBSERVED RESULT ```{}``` is printed in the output panel EXPECTED RESULT A python list of all presets currently loaded in krita is printed in the output panel SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Debian GNU/Linux Sid (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION This breakage breaks python scripts that rely on the resources() function, namely the Ten Brushes script. Specifying other types like "pattern" or "gradient" also return empty list.
"preset" is not a valid resource type which is why it is returning empty. It is a bit tricky to figure out what is available. I am working on a scripting site and have a page that show the current state of using resourcesin Krita 5.0. the site isn't live yet, but you can see the code here... https://invent.kde.org/scottpetrovic/krita-scripting-pro-website/-/blob/master/src/lessons/LessonResources.jsx#L8 You can see what is working. There are still some resource types though that are not done yet...but the resources are being done built yet either. We can close this once 5.0 is ready to test more and all the resource types are implemented.
Related to bug 430041
Resolved in 2cc1cf55831b9d6eb971774633f66ed53a891de5