Enabling Scripting in Krita 4.0.0-beta1

In my first blog post I talked about how to write a simple script to run in the alpha version of Krita 4. In this post I explain how to turn on scripts in Krita 4.0 beta and to enable the Scripter environment.  Scripter allows you to write your own short scripts and execute them from within Krita.

Prerequisites

[Update: apparently there is a problem with packaging Krita on Windows and scripting is not working as a result. So, atm if you want scripting you’re going to have to build Krita from sources yourself, regardless of the platform you’re on. Try the nightly builds if you are Windows. ]

In order to use Krita scripting you will need to either be running both Windows and Krita 4.0.0-beta1 or run Linux (or OSX) and do a bit of extra work. If you are running Linux, the appimage does not include Python scripting. At the moment to use scripting on Linux you will need to download the Krita source and compile your own copy of the application. This link has more information on compiling your own version of Krita. In addition to compiling the software, you will also need a copy of Python 3 (preferably 3.5 or higher) installed – it is a reasonably safe bet that you already have this on most Linux distros.

Turning On Scripting

So, you’ve got Krita running, but where is the Python? In Krita 4.0 alpha scripting was turned on by default. In the beta, the reverse is true – scripting is turned off by default. When you first launch Krita you will be able to see the Scripting menu in Tools->Scripts but that menu will have no items in it. For you to run any scripts (even those shipped with Krita) you need to enable the scripts from the settings menu.

Go to Settings->Configure Krita. This will display the settings dialog box:

blog_180112_settings
From there, click on Python Plugin Manager. This will give you a list of the Python plugins that Krita can find. To enable a script, click the checkbox beside it.

blog_180112_python_plugins

Right now (12 Jan 18) you have to enable or disable each of the scripts individually. There is no “select all” option. This will probably be changed in the final release.

For the time being, enable the Scripter plugin. This will allow you to write your own scripts and run them from within Krita.

Click OK, then restart Krita. The scripts will not show up in the Scripts menu until you have restarted the application.

Whether or not a script shows up in the Tools->Scripts menu will depend on how the script is written. Some scripts are written to be dockers and other scripts may be neither. If you enable a script and can’t see it in the Tools->Scripts menu look for it in the Settings->Dockers menu.

 

2 thoughts on “Enabling Scripting in Krita 4.0.0-beta1

Leave a comment