25 lines
701 B
Python
25 lines
701 B
Python
# -*- coding: utf-8 -*-
|
|||
|
|
from krita import Extension, Krita
|
||
|
|
|
||
|
|
|
||
|
|
class Kra2SvgExtension(Extension):
|
||
|
|
def __init__(self, parent):
|
||
|
|
super().__init__(parent)
|
||
|
|
|
||
|
|
def setup(self):
|
||
|
|
pass
|
||
|
|
|
||
|
|
def createActions(self, window):
|
||
|
|
action = window.createAction("kra2svg_inkscape_export",
|
||
|
|
"SVG für Inkscape exportieren…", "tools/scripts")
|
||
|
|
action.triggered.connect(self.show_dialog)
|
||
|
|
|
||
|
|
def show_dialog(self):
|
||
|
|
from .dialog import ExportDialog
|
||
|
|
win = Krita.instance().activeWindow()
|
||
|
|
dlg = ExportDialog(win.qwindow() if win else None)
|
||
|
|
dlg.exec_()
|
||
|
|
|
||
|
|
|
||
|
|
Krita.instance().addExtension(Kra2SvgExtension(Krita.instance()))
|