Skip to content

Export on save #24

@torsteingrindvik

Description

@torsteingrindvik

Hi, great plugin.

It would be great if it supported exporting on save.
I looked into Krita scripting and found that this:

from krita import *
from PyQt5.QtCore import pyqtSlot

ki = Krita.instance()

@pyqtSlot()
def exportAsSpriteSheet(self):
    # Trigger your plugin!
    ki.action('pykrita_spritesheetExporter').trigger()

imageSaved = ki.notifier().imageSaved
imageSaved.disconnect() # just so we don't add many signals when debugging
imageSaved.connect(exportAsSpriteSheet)

was enough to make your plugin window pop-up on save.

The idea is then:

  1. When doing a manual export, add a checkbox "auto-export using these settings on save"
  2. If checked, stores settings and connects slot similar to above (but no pop-up, overwrites export in background)

Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions