intermediate lesson 1

Plugin Introduction

Discuss what plugins are, pros and cons of them, why we need them, and the types of plugins we can use

Why use plugins

Plugins do similar things that normal scripts do, so why would we need them? Plugins are more convenient for artists to use and have a number of advantages.

Pros of plugins

  1. Load automatically when Krita launches
  2. Portable and easy for non-technical people to use
  3. Provide additional functionality that is harder to do with normal scripting
  4. Easier to manage larger coding projects that use multiple files

If they have so many advantages, why don't we always use plugins? These are some of the disadvantages of using plugins

Cons of plugins

  1. Slower to develop. Krita needs to restart to test any changes
  2. More files and code for doing simple things
  3. More places where things can go wrong in the code

All of the cons relate to being a developer. For an artist, plugins are a 100% a better option in the end. This is also why plugins are being introduced after most of the core concepts have been discussed. Understanding the core concepts are going to make learning about and using plugins easier.

Tip

When starting a plugin, you can make progress much faster if you use Scripter as long as possible. Being able to instantly see results without having to restart Krita can save hours of time.

Types of plugins

Knowing plugins are great and easy for people to use, I am sure you want to be using them. When you create a plugin there are two types of plugins that can be created.

  • Extensions - A menu item will be added to the scripts main menu. The script can do anything you want. All the main menu items in Krita from Tools > Scripts are extensions.
  • Dockers - Special windows that you can arrange, lock, or float, with other dockers. Many of the dockers in Krita are plugins already such as the Quick settings docker and the last documents docker.

Picking which one to choose depends on what type of functionality you want to have. If there is a large user interface like Scripter, extensions are a better bet. If it is a new color selector or toolbox you always want on the screen, dockers would be better.

Managing plugins

Plugins are managed through the configuration area in Krita under the Python Plugin Manager. From the main menu go to Settings > Configure Krita . From there there will be a python plugin manager area on the left.

Manage your python plugins

What is listed are all the plugins that are available to Krita when it starts. The plugins that are checked are the ones that are active. The ones that are not active are not loaded. When you select a plugin, there is a description about it below.

When you enable or disable plugins, you will need to restart Krita to see the changes take effect.

Conclusion

We had an overview of what plugins are and why they are useful. We also went over the types of plugins that you can make as well as how to manage them from the user interface in Krita. Next we we will get back into coding and start creating our first plugin.

Tip

If your plugin isn't loading, check the python plugin area in the configuration. If the plugin is greyed out, that means there is some coding error happening. If you hover your mouse over the plugin, a tooltip will appear telling you where the error is happening.

Next Lesson >
Anatomy of a plugin

Have questions, need help, or find a typo?

Head to the Krita artists where we have a dedicated area for plugin development and give any feedback you might have.

;