The comics manager’s only initally active dropdown “New Project” / “Open Project” could have “Recent Projects”, giving a list of the last 3-5 opened projects.
Also, the “Open Project” does not remember where the last project was opened, and starts at the home folder.
Hey! The second issue, remembering the last opened directory, is an easy fix.
Simply replace this function in the comics_project_manager_docker.py in the preinstalled plugin folder. It will remember that path when you select a comic json and open a project from it. I only tested it on Krita 5.3.1 Windows but it’s literally two lines of code added so it should work elsewhere.
"""
Open the config file and load the json file into a dictionary.
"""
def slot_open_config(self):
# Try to fetch previously opened directory setting in kritarc file
last_dir = Application.readSetting("comics_project_manager", "comic_project_recent_dir", "")
selectedFile = FileDialog.getOpenFileName(
caption=i18n("Please select the JSON comic config file."),
directory=last_dir,
filter=str(i18n("JSON files") + "(*.json)"))
if not selectedFile: return
self.path_to_config = selectedFile
if os.path.exists(self.path_to_config) is True:
if os.access(self.path_to_config, os.W_OK) is False:
QMessageBox.warning(None, i18n("Config cannot be used"), i18n("Krita doesn't have write access to this folder, so new files cannot be made. Please configure the folder access or move the project to a folder that can be written to."), QMessageBox.StandardButton.Ok)
return
# Remember this folder for next time
Application.writeSetting("comics_project_manager", "comic_project_recent_dir", os.path.dirname(self.path_to_config))
configFile = open(self.path_to_config, "r", newline="", encoding="utf-16")
self.setupDictionary = json.load(configFile)
self.projecturl = os.path.dirname(str(self.path_to_config))
configFile.close()
self.load_config()
Thank you, I hope I can get this to work!
I am however having difficulty finding the folder for pre-installed plugins. I am on Kubuntu and using the appimage installation from Krita’s download page.
I know you mentioned being on windows, so I don’t expect you to know the file location but I did want to to say thanks. I’ll report back if I get it working on my set up.
Does anyone else know where the linux/appimage version of Krita stores this information??
Yeah I unfortunately don’t have a Linux environment set up. Let me know if it works!
As a general question, I know there’s another thread for Krita’s Comic Manager plugin. They have separate votes but i feel like the threads are quite similar? I don’t know very well how threads and votes are organized but just bringing it up.