Browse Source

sceneconverter: clarify what reference count in --info-textures means.

Because a texture can be referenced by multiple attributes in a single
materials, the reference count might be higher than actual material
count, which would be confusing. Since this is mainly for informational
purposes (finding unreferenced data in a file), it doesn't make sense to
spend time working on a proper material counter right now.
pull/542/merge
Vladimír Vondruš 4 years ago
parent
commit
ee3c4fe837
  1. 5
      src/Magnum/MeshTools/sceneconverter.cpp

5
src/Magnum/MeshTools/sceneconverter.cpp

@ -537,6 +537,9 @@ used.)")
continue;
const UnsignedInt texture = material->attribute<UnsignedInt>(j, k);
/** @todo once StridedBitArrayView2D exists, fix this to
count each material only once by having one bit for
every material and texture */
if(texture < textureReferenceCount.size())
++textureReferenceCount[texture];
}
@ -875,7 +878,7 @@ used.)")
/* Print reference count only if there actually are some
materials, otherwise this information is useless */
if(importer->materialCount())
d << Utility::formatString("(referenced by {} materials)", info.references);
d << Utility::formatString("(referenced by {} material attributes)", info.references);
d << Debug::nospace << ":";
if(!info.name.empty()) d << info.name;
d << Debug::newline;

Loading…
Cancel
Save