Back to Krita

BBD's Krita Script Starter

plugins/python/krita_script_starter/Manual.html

6.0.1.11.3 KB
Original Source

BBD's Krita Script Starter

This script sets up the various files that Krita expects to see when it runs a script. That is:

  • the .desktop meta data file
  • the package directory
  • the __init__.py file
  • the main python file for your package
  • the Manual.html file for your documentation

It will correctly name your package, do relevant imports, create a class of the relevant type (ie Extension v Docker) and name the class based on the name you choose for your script.

Usage

When you run the script it will present a dialog box. Enter the name of your script in the entry box provided and choose whether you want the script to be an Extension (added to the scripts menu) or a Docker (available to be opened as a docker). Type in a comment for the script (this is displayed in the Krita dialog when enabling scripts) and, if you want, the text of how you want your script to appear in the menu. You can choose to have your script automatically enabled by checking the "Enable Script" checkbox.

These files will be created in the pykrita subfolder of your resources directory.

Warning

If a script with the name you choose already exists a warning will be shown in the status box. If you click Create Script any files that already exist will be overwritten without further confirmation, so pay attention to any warnings.