
This should be the unique ID you made for your action when creating it in the setup of the extension.

This will create a sub-category under scripts called “My Scripts” to add your shortcuts to.

My Scripts My Script 10000 0 ctrl+alt+shift+p false My Scripts Krita python plugins need to be python modules, so make sure there’s an _init_.py script, containing something like… The description that will show up in the Python Plugin Manager. The name that will show up in the Python Plugin Manager. If it’s an HTML file it’ll be shown as rich text, if not, it’ll be shown as plain text. This is shown in the Python Plugin manager.
MAKING A PYTHON TEXT EDITOR MANUAL
X-Krita-ManualĪn Optional Value that will point to the manual item. If Krita was built with python 2 instead of 3 ( -DENABLE_PYTHON_2=ON in the cmake configuration), then this plugin will not show up in the list. This should be the name of the plugin folder you just created. This should always be Krita/PythonPlugin for python plugins. html Name = My Own Plugin Comment = Our very own plugin. Type = Service ServiceTypes = Krita / PythonPlugin X - KDE - Library = myplugin X - Python - 2 - Compatible = false X - Krita - Manual = myPluginManual. Therefore, for each proper plugin you will need to create a folder, and a desktop file. desktop extension that contain information about the script itself. Scripts are identified by a file that ends in a. If there is no pykrita subfolder in the Krita resources directory use your file manager to create one. See the API docs under “Auto starting scripts”. This should open a file manager on your system at your Krita resources folder. To find your resources folder start Krita and click the Settings ‣ Manage Resources… menu item. For Krita to load your script both of these must put be in the pykrita subdirectory of your Krita resources folder (See Resource Management for the paths per operating system). Getting Krita to recognize your plugin ¶Ī script in Krita has two components – the script directory (holding your script’s Python files) and a “.desktop” file that Krita uses to load and register your script. These mini-tutorials are written for people with a basic understanding of python, and in such a way to encourage experimentation instead of plainly copy and pasting code, so read the text carefully.
MAKING A PYTHON TEXT EDITOR HOW TO
So this page will give an overview how to create the various types of python script unique to Krita.

Okay, so even if you know python really well, there are some little details to getting Krita to recognize a python plugin. Wrapping your script in a plugin can give you much more flexibility and power than running scripts from the Scripter editor. You might have some neat scripts you have written in the Scripter Python runner, but maybe you want to do more with it and run it automatically for instance.
