Summary: | Basename not updating when doing: Krita.instance().writeSetting('','ExportConfiguration-ANIMATION_EXPORT',str_xml) | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Hannah <personal.hannahdh> |
Component: | Scripting | Assignee: | Eoin O'Neill <eoinoneill1991> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | halla |
Priority: | NOR | ||
Version: | nightly build (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Other | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/0cd6e798253d3cdabb5e68590f2dc86be06f64dd | Version Fixed In: | |
Sentry Crash Report: |
Description
Hannah
2022-03-18 12:48:14 UTC
Workaround found so far: Basename won't update when doing the action Krita.instance().action('render_animation').trigger() it will update if you do Krita.instance().action('render_animation_again').trigger() Is it because the latter catches the XML instead of the QT string? correct me if I am wrong. Yes, renderAnimation doesn't get the export configuration. This is the relevant code: void KisMainWindow::renderAnimation() { if (!activeView()) return; KisImageSP image = viewManager()->image(); if (!image) return; if (!image->animationInterface()->hasAnimation()) return; KisDocument *doc = viewManager()->document(); KisDlgAnimationRenderer dlgAnimationRenderer(doc, viewManager()->mainWindow()); dlgAnimationRenderer.setCaption(i18n("Render Animation")); if (dlgAnimationRenderer.exec() == QDialog::Accepted) { KisAnimationRenderingOptions encoderOptions = dlgAnimationRenderer.getEncoderOptions(); KisAnimationRender::render(doc, viewManager(), encoderOptions); } } void KisMainWindow::renderAnimationAgain() { KisImageSP image = viewManager()->image(); if (!image) return; if (!image->animationInterface()->hasAnimation()) return; KisDocument *doc = viewManager()->document(); KisConfig cfg(true); KisPropertiesConfigurationSP settings = cfg.exportConfiguration("ANIMATION_EXPORT"); KisAnimationRenderingOptions encoderOptions; encoderOptions.fromProperties(settings); KisAnimationRender::render(doc, viewManager(), encoderOptions); } Eoin, can you check whether this was intentional? Also, renderAnimationAgain doesn't check whether there's an active view? Git commit ea220aae2415eb324351ab8e41b92679848311b6 by Eoin O'Neill. Committed on 08/04/2022 at 04:16. Pushed by eoinoneill into branch 'master'. Fix incorrect basename for animation when kra filepath or filename changes. This should be a middle ground between keeping the users prefered animation name (which people want when exporting the same animation multiple times to different formats) and reseting the basename to match krita doc filename (which allows users to copy a kra file for modifications / backup and render with a separate name, if they desire.) If this results in users requesting to keep the last basename used regardless of file path, we might need to be creative with solutions here. There's a good argument both ways here. M +3 -2 libs/ui/animation/KisDlgAnimationRenderer.cpp https://invent.kde.org/graphics/krita/commit/ea220aae2415eb324351ab8e41b92679848311b6 Git commit 0cd6e798253d3cdabb5e68590f2dc86be06f64dd by Eoin O'Neill. Committed on 12/04/2022 at 04:52. Pushed by eoinoneill into branch 'krita/5.0'. Fix incorrect basename for animation when kra filepath or filename changes. This should be a middle ground between keeping the users prefered animation name (which people want when exporting the same animation multiple times to different formats) and reseting the basename to match krita doc filename (which allows users to copy a kra file for modifications / backup and render with a separate name, if they desire.) If this results in users requesting to keep the last basename used regardless of file path, we might need to be creative with solutions here. There's a good argument both ways here. (cherry picked from commit ea220aae2415eb324351ab8e41b92679848311b6) M +3 -2 libs/ui/animation/KisDlgAnimationRenderer.cpp https://invent.kde.org/graphics/krita/commit/0cd6e798253d3cdabb5e68590f2dc86be06f64dd |