From fa31202c9ca4adb331704394d53f0a93b8795167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 1 Jun 2020 11:23:24 +0200 Subject: [PATCH] sceneconverter: show mesh reference count only if there's a scene. Otherwise, for plain formats without a scene graph such as PLY or STL, the information is useless. --- src/Magnum/MeshTools/sceneconverter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Magnum/MeshTools/sceneconverter.cpp b/src/Magnum/MeshTools/sceneconverter.cpp index 390bdb95b..8eef3506b 100644 --- a/src/Magnum/MeshTools/sceneconverter.cpp +++ b/src/Magnum/MeshTools/sceneconverter.cpp @@ -315,8 +315,12 @@ save its output; if no --converter is specified, AnySceneConverter is used.)") for(const MeshInfo& info: meshInfos) { Debug d; if(info.level == 0) { - d << "Mesh" << info.mesh - << Utility::formatString("(referenced by {} objects):", info.references); + d << "Mesh" << info.mesh; + /* Print reference count only if there actually is a scene, + otherwise this information is useless */ + if(importer->object3DCount()) + d << Utility::formatString("(referenced by {} objects)", info.references); + d << Debug::nospace << ":"; if(!info.name.empty()) d << info.name; d << Debug::newline; }