diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index 8e35186bd0..e657587a7a 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -13,7 +13,7 @@ setup_memory_debugger() link_hifi_libraries( audio avatars octree gpu model fbx entities networking animation recording shared script-engine embedded-webserver - controllers physics plugins midi image baking + controllers physics plugins midi image ) add_dependencies(${TARGET_NAME} oven) diff --git a/assignment-client/src/assets/AssetServer.cpp b/assignment-client/src/assets/AssetServer.cpp index 98c29b02bb..1b533f10f3 100644 --- a/assignment-client/src/assets/AssetServer.cpp +++ b/assignment-client/src/assets/AssetServer.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include "AssetServerLogging.h" #include "BakeAssetTask.h" @@ -250,7 +249,7 @@ AssetServer::AssetServer(ReceivedMessage& message) : image::setNormalTexturesCompressionEnabled(true); image::setCubeTexturesCompressionEnabled(true); - BAKEABLE_TEXTURE_EXTENSIONS = TextureBaker::getSupportedFormats(); + BAKEABLE_TEXTURE_EXTENSIONS = image::getSupportedFormats(); qDebug() << "Supported baking texture formats:" << BAKEABLE_MODEL_EXTENSIONS; // Most of the work will be I/O bound, reading from disk and constructing packet objects, diff --git a/libraries/baking/src/FBXBaker.cpp b/libraries/baking/src/FBXBaker.cpp index ee24d6a4c2..a765e66bbc 100644 --- a/libraries/baking/src/FBXBaker.cpp +++ b/libraries/baking/src/FBXBaker.cpp @@ -607,7 +607,7 @@ void FBXBaker::rewriteAndBakeSceneTextures() { return; } - if (!TextureBaker::getSupportedFormats().contains(textureFileInfo.suffix())) { + if (!image::getSupportedFormats().contains(textureFileInfo.suffix())) { // this is a texture format we don't bake, skip it handleWarning(fbxTextureFileName + " is not a bakeable texture format"); continue; diff --git a/libraries/baking/src/TextureBaker.cpp b/libraries/baking/src/TextureBaker.cpp index 1a320efabc..ff006e7185 100644 --- a/libraries/baking/src/TextureBaker.cpp +++ b/libraries/baking/src/TextureBaker.cpp @@ -61,14 +61,6 @@ void TextureBaker::abort() { _abortProcessing.store(true); } -const QStringList TextureBaker::getSupportedFormats() { - auto formats = QImageReader::supportedImageFormats(); - QStringList stringFormats; - std::transform(formats.begin(), formats.end(), std::back_inserter(stringFormats), - [](QByteArray& format) -> QString { return format; }); - return stringFormats; -} - void TextureBaker::loadTexture() { // check if the texture is local or first needs to be downloaded if (_textureURL.isLocalFile()) { diff --git a/libraries/baking/src/TextureBaker.h b/libraries/baking/src/TextureBaker.h index b2e86b2b5b..90ecfe52f7 100644 --- a/libraries/baking/src/TextureBaker.h +++ b/libraries/baking/src/TextureBaker.h @@ -31,8 +31,6 @@ public: const QDir& outputDirectory, const QString& bakedFilename = QString(), const QByteArray& textureContent = QByteArray()); - static const QStringList getSupportedFormats(); - const QByteArray& getOriginalTexture() const { return _originalTexture; } QUrl getTextureURL() const { return _textureURL; } diff --git a/libraries/image/src/image/Image.cpp b/libraries/image/src/image/Image.cpp index 9f584c844f..de91901739 100644 --- a/libraries/image/src/image/Image.cpp +++ b/libraries/image/src/image/Image.cpp @@ -75,6 +75,14 @@ glm::uvec2 rectifyToSparseSize(const glm::uvec2& size) { namespace image { +const QStringList getSupportedFormats() { + auto formats = QImageReader::supportedImageFormats(); + QStringList stringFormats; + std::transform(formats.begin(), formats.end(), std::back_inserter(stringFormats), + [](QByteArray& format) -> QString { return format; }); + return stringFormats; +} + QImage::Format QIMAGE_HDR_FORMAT = QImage::Format_RGB30; TextureUsage::TextureLoader TextureUsage::getTextureLoaderForType(Type type, const QVariantMap& options) { diff --git a/libraries/image/src/image/Image.h b/libraries/image/src/image/Image.h index 856dc009cf..ef175935d0 100644 --- a/libraries/image/src/image/Image.h +++ b/libraries/image/src/image/Image.h @@ -80,6 +80,8 @@ gpu::TexturePointer processCubeTextureColorFromImage(const QImage& srcImage, con } // namespace TextureUsage +const QStringList getSupportedFormats(); + bool isColorTexturesCompressionEnabled(); bool isNormalTexturesCompressionEnabled(); bool isGrayscaleTexturesCompressionEnabled(); diff --git a/tools/oven/CMakeLists.txt b/tools/oven/CMakeLists.txt index 5f8f2c9542..321f81ba8f 100644 --- a/tools/oven/CMakeLists.txt +++ b/tools/oven/CMakeLists.txt @@ -17,6 +17,4 @@ if (UNIX) endif() endif () -set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL FALSE EXCLUDE_FROM_DEFAULT_BUILD FALSE) - install_beside_console()