summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-07 10:02:49 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-13 09:18:02 +0000
commit90435d6cd003c727167af002f6e9d02fdd0bb98c (patch)
tree2a50bb3816fb288d193b9a2e1b5061980b826b99 /tools
parentabeb0ea0dc3b9e09cd6946ddf9a9a82f4b360e36 (diff)
qgltf: Add a short description to the help
Change-Id: I978127436e197c714f7ad43c86c1c7896b94d9cd Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qgltf/qgltf.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/qgltf/qgltf.cpp b/tools/qgltf/qgltf.cpp
index 02de0224b..cd6f23280 100644
--- a/tools/qgltf/qgltf.cpp
+++ b/tools/qgltf/qgltf.cpp
@@ -2458,6 +2458,14 @@ void GltfExporter::save(const QString &inputFilename)
qDebug() << "Done\n";
}
+static const char *description =
+ "qgltf uses Assimp to import a variety of 3D model formats "
+ "and export it into fast-to-load, optimized glTF "
+ "assets embedded into Qt resource files.\n\n"
+ "Note: this tool should typically not be invoked directly. Instead, "
+ "let qmake manage it based on QT3D_MODELS in the .pro file.\n\n"
+ "For standard Qt 3D usage the recommended options are -b -S.";
+
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
@@ -2467,6 +2475,7 @@ int main(int argc, char **argv)
QCommandLineParser cmdLine;
cmdLine.addHelpOption();
cmdLine.addVersionOption();
+ cmdLine.setApplicationDescription(QString::fromUtf8(description));
QCommandLineOption outDirOpt(QStringLiteral("d"), QStringLiteral("Place all output data into <dir>"), QStringLiteral("dir"));
cmdLine.addOption(outDirOpt);
QCommandLineOption binOpt(QStringLiteral("b"), QStringLiteral("Store binary JSON data in the .qgltf file"));
@@ -2517,6 +2526,9 @@ int main(int argc, char **argv)
QDir().mkpath(opts.outDir);
}
+ if (cmdLine.positionalArguments().isEmpty())
+ cmdLine.showHelp();
+
AssimpImporter importer;
GltfExporter exporter(&importer);
foreach (const QString &fn, cmdLine.positionalArguments()) {