diff --git a/plugins/extensions/animationrenderer/AnimationRenderer.h b/plugins/extensions/animationrenderer/AnimationRenderer.h --- a/plugins/extensions/animationrenderer/AnimationRenderer.h +++ b/plugins/extensions/animationrenderer/AnimationRenderer.h @@ -31,7 +31,23 @@ private Q_SLOTS: + /** + * @brief slotRenderAnimation + * + * Triggered from the renderanimation action. This calls a dialog + * to set the animation settings and then takes that to call the appropriate exporter, + * this can be a frame exporter, or it is a KisVideoExport object as defined in + * plugins/extensions/impex. + */ void slotRenderAnimation(); + /** + * @brief slotRenderSequenceAgain + * + * triggered from the renderanimationagain action. This does not call a dialog, but + * instead uses the settings to set the animation settings and then takes that to + * call the appropriate exporter, this can be a frame exporter, or it is a + * KisVideoExport object as defined in plugins/extensions/impex. + */ void slotRenderSequenceAgain(); }; diff --git a/plugins/extensions/animationrenderer/AnimationRenderer.cpp b/plugins/extensions/animationrenderer/AnimationRenderer.cpp --- a/plugins/extensions/animationrenderer/AnimationRenderer.cpp +++ b/plugins/extensions/animationrenderer/AnimationRenderer.cpp @@ -148,6 +148,7 @@ KisImportExportFilter::ConversionStatus res; if (!fi.open(QIODevice::WriteOnly)) { qWarning() << "Could not open" << fi.fileName() << "for writing!"; + doc->setErrorMessage(i18n("Could not open %1 for writing!", fi.fileName())); res = KisImportExportFilter::CreationError; } else { diff --git a/plugins/impex/video/kis_video_export.h b/plugins/impex/video/kis_video_export.h --- a/plugins/impex/video/kis_video_export.h +++ b/plugins/impex/video/kis_video_export.h @@ -23,7 +23,12 @@ #include #include - +/** + * @brief The KisVideoExport class this controls the export + * plugin for video file export. This class deals with the plugin parts. + * Video saver deals with taking all the parts(document, ffmpeg, config) + * and getting ffmpeg to take the config and document to create a video file. + */ class KisVideoExport : public KisImportExportFilter { Q_OBJECT diff --git a/plugins/impex/video/kis_video_export.cpp b/plugins/impex/video/kis_video_export.cpp --- a/plugins/impex/video/kis_video_export.cpp +++ b/plugins/impex/video/kis_video_export.cpp @@ -73,6 +73,7 @@ else { qWarning() << warningMessage; } + document->setErrorMessage(warningMessage); return KisImportExportFilter::UsageError; } } diff --git a/plugins/impex/video/video_saver.h b/plugins/impex/video/video_saver.h --- a/plugins/impex/video/video_saver.h +++ b/plugins/impex/video/video_saver.h @@ -38,10 +38,29 @@ Q_OBJECT public: + /** + * @brief VideoSaver + * This is the object that takes an animation document and config and tells ffmpeg + * to render it. Log files are generated here too. + * @param doc the document to use for rendering. + * @param ffmpegPath the path to the ffmpeg executable. + * @param batchMode whether Krita is in batchmde and we can thus not show gui widgets. + */ VideoSaver(KisDocument* doc, const QString &ffmpegPath, bool batchMode); ~VideoSaver() override; + /** + * @brief image + * @return get the image used by this exporter. + */ KisImageSP image(); + /** + * @brief encode the main encoding function. + * This in turn calls runFFMpeg, which is a private function inside this class. + * @param filename the filename to which to render the animation. + * @param configuration the configuration + * @return whether it is succesful or had another failure. + */ KisImageBuilder_Result encode(const QString &filename, KisPropertiesConfigurationSP configuration); bool hasFFMpeg() const; diff --git a/plugins/impex/video/video_saver.cpp b/plugins/impex/video/video_saver.cpp --- a/plugins/impex/video/video_saver.cpp +++ b/plugins/impex/video/video_saver.cpp @@ -217,6 +217,7 @@ if (m_ffmpegPath.isEmpty()) { m_ffmpegPath = configuration->getString("ffmpeg_path"); if (!QFileInfo(m_ffmpegPath).exists()) { + m_doc->setErrorMessage(i18n("ffmpeg could not be found at %1", m_ffmpegPath)); return KisImageBuilder_RESULT_FAILURE; } }