Commit 0a7e79f2 authored by Dmitry Kazakov's avatar Dmitry Kazakov

If rendering only video, save it into the save folder as the image itself

(by default)
parent 57173609
......@@ -122,10 +122,9 @@ void AnimaterionRenderer::slotRenderAnimation()
encoderConfig->setProperty("savedFilesMask", savedFilesMask);
}
const QDir framesDir(sequenceConfig->getString("directory"));
const QString fileName = videoConfig->getString("filename");
QString resultFile = QFileInfo(fileName).isAbsolute() ? fileName :
framesDir.absoluteFilePath(fileName);
QString resultFile = fileName;
KIS_SAFE_ASSERT_RECOVER_NOOP(QFileInfo(resultFile).isAbsolute())
{
const QFileInfo info(resultFile);
......
......@@ -201,10 +201,25 @@ QString DlgAnimationRenderer::fetchRenderingDirectory() const
QString DlgAnimationRenderer::fetchRenderingFileName() const
{
QString filename = m_page->videoFilename->fileName();
if (QFileInfo(filename).completeSuffix().isEmpty()) {
QString mimetype = m_page->cmbRenderType->itemData(m_page->cmbRenderType->currentIndex()).toString();
filename += "." + KisMimeDatabase::suffixesForMimeType(mimetype).first();
}
if (QFileInfo(filename).isRelative()) {
QDir baseDir(m_page->dirRequester->fileName());
if (m_page->shouldExportOnlyVideo->isChecked()) {
QString documentDir = QFileInfo(m_doc->url().toLocalFile()).absolutePath();
if (!documentDir.isEmpty()) {
baseDir = documentDir;
}
}
filename = baseDir.absoluteFilePath(filename);
}
return filename;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment