Fix issues with changing the resource location
This is a rebased, mostly fixed version of !1281 (closed) .
Test plan
Test plan copied from !1281 (closed):
- Change the default resource location
- Check functionality:
-
Python plugins - didn't work, but I fixed it
- error message:
Module not loaded: ModuleNotFoundError: No module named '[plugin name]' Could not import [plugin name]
. - default plugins work as usual
- plugins are visible in the Python Plugin Manager menu in Configure Krita but with the aforementioned error message
-
install a python plugin from a url - importing works, but the plugin doesn't -
install a python plugin from local - importing works, but the plugin doesn't -
just find a python plugin in the resource folder - it does found the plugin, but it somehow doesn't work properly
-
check whether the layer styles are saved in the right place -
check whether icc profiles are found, and whether an icc profile placed in the resource folder is found -
ditto with color schemes -
ditto with input profiles - remember to press OK in the Configure Krita dialog, otherwise it won't be saved! -
templates - didn't work, fixed -
tags -
"kis_shortcuts" -
"preset_icons" -
PaintOpPresets -
Brushes -
Gradients -
Palettes -
Patterns -
Workspaces -
Symbols -
WindowLayouts -
Sessions -
GamutMasks -
SeExprScripts -
TaskSets -
Author's info -
Drag'n'drop bundles to welcome page (unfortunately you gotta restart because it doesn't use our new shiny resource system yet, I think)
Which assets/resources I haven't checked:
-
"kis_actions" (the ones from BuliBrush Switch seems to work fine but I've got some error messages on the console: NOT COOL: Duplicated action name from xml data: "bulibrushswitch_settings"
so I'm not sure if it's reliable enough) -
"gmic_definitions" - ? - couldn't find it -
"markers" - not relevant -
"kis_pics" - not relevant -
"kis_images" - not relevant -
"metadata_schema" - not relevant -
ResourceType::FilterEffects - ?
What I did (tiar) in the new commits
- two coding style changes
- fixed
clearDirs()
to actually add the correct, clean dirs to the list instead of always returning an empty list (which fixed default templates) - added
saveLocation()
to places where Python plugins are searched for (which fixed Python plugins to work in custom resource folders) - changed the location for authors info to be the custom folder
- changed the location for the bundle when the user installs it by dropping into the Welcome Page
What needs to be done:
-
(Windows only): -
fix KisViewManager::openResourcesDirectory() ( Settings -> Manage Resources
, clickOpen Resource Folder
, it should open the correct folder) -
fix kis_dlg_preferences.cpp line ~400 (Windows Store package only)
-
-
(Doesn't affect users right now, since I made sure all places I could find still work regardless). Fix KoResourcePaths::findDirs()
not includingKoResourcePaths::saveLocation()
, unless it's deliberate, though it already caused issues with the Python plugins, and right now both Python plugins and Templates need to call both functions to get all places where things can be located. -
Tests on Windows
Edited by Agata Cacko