Windows with a cross

I am working on the Key Enter plugin and I was trying to make it lighter but I have a odd question when pondering options to make it not lock Krita with heavy calculations.

Does the Scripter plugin work on another Thread to work even when Krita is closed? It is a Extension Dialog right? Or making a docker with a Qthread makes more sense?

All scripter does is just this:

code = compile(script, '<string>', 'exec')
exec(code, {'__name__': '__main__'})

Then intercept the stdout.

You have to run it on a different thread if you want it not to lock. Then emit things back to the main thread.

1 Like