Hello,
I bring news. My first krita plugin
I just hope this don’t just crash and burn
DISCLAIMER!
This is a prototype and highly likely to break or not work as intended, without any way to fix it!
This plugin was made as a proof of concept, using the Python API in an unintended way (probably), a bunch of hard-coded mess and …
Notes
The following plugin is what I would call a ‘pre-alpha’ version (version 0.1)
Any feedback or bug report is welcome, but keep in mind that any bug might be ‘un-fixable’ due the current implementation.Requirements
Krita version 5.2.0 or higher.
This plugin utilize a newer version of the Python API, thus the strict version requirementTesting
Only tested using the krita-5.2.0-prealpha Linux appimage
[27/09/2024] PET v0.5 (Prototype)
- New function: Now the plugin has an additional swap brush shortcut. With which you can swap between the last used brush, and lasted used eraser with the same shortcut.
[28/07/2023] PET v0.4 (Prototype)
- HotFix: prevent crash by removing unprintable characters from brush XML before creating the brush list
[17/01/2023] PET v0.3 (Prototype)
- Fix: The plugin now find the Brush Docker with old and new internal names.
- Added: The plugin don’t crash when unable to connect to Krita dockers or internal signals.
- Added: An error message box with a short description in case of unexpected but predictable errors.
[01/10/2022] PET v0.2 (Prototype)
- The plugin now can be used on non-Paint layers.
- Fixed Bug. Whenever the last used preset was deleted, or part of a deactivated bundle the plugin would throw an error.
- Minor code polishing.
[22/09/2022] PET v0.1 (Prototype)
What is PET?
PET is a Python Plugin. It serves as prototype for an ‘Eraser Tool’ into Krita.
This plugin intents to add a shortcut for Non-Eraser brushes, and another for Eraser brushes. Thus mimicking the behavior of an dedicated Eraser Tool.
Functionality
Krita start-up time will increase drastically the First Time the plugin run. That is due the process which the plugin access, analyses and categorize the brushes. Following sessions should have a normal start-up time, as long your brushes remains the same.
This plugin scan all available brushes in Krita, and creates two list out of them. The first list of all Non-Erasers brushes (list 1) and the other of all the Erasers brushes (list 2).
By default this plugin has two shortcuts, both activate the Free Hand Brush Tool. The first one ‘remember’ the last selected Non-Eraser brush. The second one ‘remember’ the last selected Eraser brush.
How to
The default shortcuts are defined as:
- Brush slot → Ctrl+Alt+Shift+P
- Eraser slot → Ctrl+Alt+Shift+O
- Update Brush List → Ctrl+Alt+Shift+A
The plugin should capture the current brush selected and assign it to the proper slot. This behavior was tested using the Brush Preset Docker, the Brush Preset in the Tool Bar, the Popup Palette and the shortcuts Previous Favorite Preset / Next Favorite Preset.
Using others plugins (Ten Brushes, BuliBrushSwitch) for changing presets weren’t test.
Updating the Brush List
Under specific circumstances, the plugin can update the list of brushes either automatically or manually, these being:
-Automatically:
- The plugin is being ran for the first time
- The name or number of brushes have changed
- After installing or deactivating bundles
- Something is wrong with the Brush List save file
-Manually:
- Via the shortcut Update Brush List. Default key combination (Ctrl+Shift+Alt+A)
ATTENTION!
The save file only has a reference to the preset names. So changing a brush to an eraser (or vice-versa), and saving it with the same name will not update the brush list when Krita starts. In this case update the brush list manually.