Browse Source

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.
pull/449/head
Vladimír Vondruš 6 years ago
parent
commit
fa31202c9c
  1. 8
      src/Magnum/MeshTools/sceneconverter.cpp

8
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) { for(const MeshInfo& info: meshInfos) {
Debug d; Debug d;
if(info.level == 0) { if(info.level == 0) {
d << "Mesh" << info.mesh d << "Mesh" << info.mesh;
<< Utility::formatString("(referenced by {} objects):", info.references); /* 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; if(!info.name.empty()) d << info.name;
d << Debug::newline; d << Debug::newline;
} }

Loading…
Cancel
Save