From 6b8e309f20a759210a5b100961ab496c842ce6df Mon Sep 17 00:00:00 2001 From: Rodney Date: Nov 09 2022 07:44:11 +0000 Subject: Merge pull request #4596 from justburner/Patch4591 Patch for #4591 --- diff --git a/toonz/sources/common/tiio/tiio.cpp b/toonz/sources/common/tiio/tiio.cpp index d664add..0b8a40d 100644 --- a/toonz/sources/common/tiio/tiio.cpp +++ b/toonz/sources/common/tiio/tiio.cpp @@ -263,3 +263,13 @@ void Tiio::Writer::getSupportedFormats(QStringList &formats, void Tiio::Writer::setProperties(TPropertyGroup *properties) { m_properties = properties ? properties->clone() : 0; } + +//----------------------------------------------------- + +bool Tiio::useQuicktime(bool enable) { + static bool state = false; + if (enable) state = true; + return state; +} + +//----------------------------------------------------- diff --git a/toonz/sources/image/tiio.cpp b/toonz/sources/image/tiio.cpp index 1bde568..0bfd43f 100644 --- a/toonz/sources/image/tiio.cpp +++ b/toonz/sources/image/tiio.cpp @@ -247,6 +247,8 @@ void initImageIo(bool lightVersion) { #endif // _WIN32 if (IsQuickTimeInstalled()) { + Tiio::useQuicktime(true); + TLevelWriter::define("mov", TLevelWriterMov::create, true); TLevelReader::define("mov", TLevelReaderMov::create); TFileType::declare("mov", TFileType::RASTER_LEVEL); diff --git a/toonz/sources/include/tiio.h b/toonz/sources/include/tiio.h index e2bb7a2..30dd6db 100644 --- a/toonz/sources/include/tiio.h +++ b/toonz/sources/include/tiio.h @@ -172,6 +172,8 @@ DVAPI void defineWriterProperties(const char *ext, TPropertyGroup *); DVAPI bool isQuicktimeInstalled(); +DVAPI bool useQuicktime(bool enable = false); + DVAPI void updateFileWritersPropertiesTranslation(); //------------------------------------------------------------------- diff --git a/toonz/sources/toonz/formatsettingspopups.cpp b/toonz/sources/toonz/formatsettingspopups.cpp index fa735fd..6631a12 100644 --- a/toonz/sources/toonz/formatsettingspopups.cpp +++ b/toonz/sources/toonz/formatsettingspopups.cpp @@ -404,8 +404,7 @@ void FormatSettingsPopup::onPaddingCBChanged() { bool openFormatSettingsPopup(QWidget *parent, const std::string &format, TPropertyGroup *props, TFrameId *tmplFId, bool forInput, const TFilePath &levelPath) { - bool quicktime = - (format == "mov" || format == "3gp") && Tiio::isQuicktimeInstalled(); + bool quicktime = (format == "mov" || format == "3gp") && Tiio::useQuicktime(); if (quicktime) // trattato diversamente; il format // popup dei mov e' quello di // quicktime