export_layers_enhanced.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. # This script is licensed CC 0 1.0, so that you can learn from it.
  2. # ------ CC 0 1.0 ---------------
  3. # The person who associated a work with this deed has dedicated the
  4. # work to the public domain by waiving all of his or her rights to the
  5. # work worldwide under copyright law, including all related and
  6. # neighboring rights, to the extent allowed by law.
  7. # You can copy, modify, distribute and perform the work, even for
  8. # commercial purposes, all without asking permission.
  9. # https://creativecommons.org/publicdomain/zero/1.0/legalcode
  10. import krita
  11. from . import uiexportlayers
  12. class ExportLayersEnhancedExtension(krita.Extension):
  13. def __init__(self, parent):
  14. super(ExportLayersEnhancedExtension, self).__init__(parent)
  15. def setup(self):
  16. pass
  17. def createActions(self, window):
  18. action = window.createAction("export_layers_enhanced", i18n("Export Layers Enhanced"))
  19. action.setToolTip(i18n("Plugin to export layers from a document."))
  20. action.triggered.connect(self.initialize)
  21. def initialize(self):
  22. self.uiexportlayers = uiexportlayers.UIExportLayers()
  23. self.uiexportlayers.initialize()