Bug 504309 - Node.save() does not respect Document.batchmode()
Summary: Node.save() does not respect Document.batchmode()
Status: REPORTED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (other bugs)
Version First Reported In: 5.2.9
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-16 06:17 UTC by uruwi
Modified: 2025-05-16 06:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description uruwi 2025-05-16 06:17:52 UTC
SUMMARY: When `Node`’s `save` method is called, a dialog box is shown for the export regardless of whether `batchmode` is enabled for the document.


STEPS TO REPRODUCE
1. Run the following code in Scripter:

```
from krita import *

kr = Krita.instance()
document = kr.activeDocument()

export_config = InfoObject()
export_config.setProperty("alpha", True)
export_config.setProperty("compression", 9)
export_config.setProperty("forceSRGB", True)
export_config.setProperty("indexed", False)
export_config.setProperty("interlaced", False)
export_config.setProperty("saveSRGBProfile", False)
export_config.setProperty("transparencyFillColor", [0, 0, 0, 0])

document.setBatchmode(True)
# document.exportImage("aaa.png", export_config) # executes without showing a dialog as expected
document.rootNode().save("aaa.png", document.xRes(), document.yRes(), export_config) # shows a dialog!
```

OBSERVED RESULT: A dialog box is shown for the export.

EXPECTED RESULT: No dialog box should be shown.


SOFTWARE/OS VERSIONS
Windows: n/a
macOS: n/a
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION: n/a