From 251046782631ca13a2df1d23c73fc68691fc77bc Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 6 Jan 2016 15:23:02 +0100 Subject: qgltf: Fix not including image files in the qrc Once again, the problem surfaces: when not specifying an output directory, image files are not added to the resource list. Change it to go through the external texture list always. Change-Id: Ic3da5d7f8b1da958c6453f18650f2e50c70a0d1f Reviewed-by: Andy Nichols --- tools/qgltf/qgltf.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/qgltf/qgltf.cpp b/tools/qgltf/qgltf.cpp index 22ab5c84b..14e23939f 100644 --- a/tools/qgltf/qgltf.cpp +++ b/tools/qgltf/qgltf.cpp @@ -1191,12 +1191,12 @@ bool Exporter::nodeIsUseful(const Importer::Node *n) const void Exporter::copyExternalTextures(const QString &inputFilename) { - // External textures need copying only when output dir was specified. - if (!opts.outDir.isEmpty()) { - foreach (const QString &textureFilename, m_importer->externalTextures()) { - QString dst = opts.outDir + textureFilename; - QString src = QFileInfo(inputFilename).path() + QStringLiteral("/") + textureFilename; - m_files.insert(QFileInfo(dst).fileName()); + foreach (const QString &textureFilename, m_importer->externalTextures()) { + const QString dst = opts.outDir + textureFilename; + m_files.insert(QFileInfo(dst).fileName()); + // External textures need copying only when output dir was specified. + if (!opts.outDir.isEmpty()) { + const QString src = QFileInfo(inputFilename).path() + QStringLiteral("/") + textureFilename; if (QFileInfo(src).absolutePath() != QFileInfo(dst).absolutePath()) { if (opts.showLog) qDebug().noquote() << "Copying" << src << "to" << dst; -- cgit v1.2.3