Toggle Brushes with Actuator

Use scripting capability of Krita painting software to toggle two selected brushes with Actuator's sequence.

Use scripting capability of Krita painting software to toggle two selected brushes with Actuator’s sequence.

from krita import Krita

all_presets = Krita.instance().resources('preset')

BRUSH_ONE = "f) Charcoal Rock Soft"
BRUSH_TWO = "b) Basic-5 Size"

currentView = Krita.instance().activeWindow().activeView()
active_brush = currentView.currentBrushPreset().name()

if active_brush == BRUSH_ONE:
    new_brush = BRUSH_TWO
else:
    new_brush = BRUSH_ONE

currentView.setCurrentBrushPreset(all_presets[new_brush])

Download sequence.

Is toggling between brush is not enough? Check out the sequence to cycle through the tools.