I wanted to detect when krita saves so I can stop my script and not cause issues. Libkis has been down so I am not sure what to do to look for information. Does anyone know if it is possible?
I posted 3 alternatives you can use in this thread:
As for your question, it should be possible. Though you gotta be more precise on which save? Regular save/save as? autosave? And do you need it to stop before the save?
-
There is imageSaved(filename: str) [signal] inside Notifier.
-
You can technically hook onto actions such as
Krita.instance().action('file_save').triggered.connect()
But if you want it to stop your code before the save, that may be more complicated. You can try a directconnection and see if that works, if not, you might need to do an eventfilter.
I think I managed to solve my saving issue by fixing a bug I had but was not aware of. I had a hidden loop that made exponential loops to check the file being saved and would lag everything out into oblivion the more loops it had.
But I will keep this noted as I am sure I will need this for something in the future.
thank you @KnowZero .