From ee3c4fe8371e0cbe8493fd5a38ecfaf7ea6cf1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 11 Dec 2021 17:59:27 +0100 Subject: [PATCH] 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. --- src/Magnum/MeshTools/sceneconverter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Magnum/MeshTools/sceneconverter.cpp b/src/Magnum/MeshTools/sceneconverter.cpp index 317d94d49..388eabc42 100644 --- a/src/Magnum/MeshTools/sceneconverter.cpp +++ b/src/Magnum/MeshTools/sceneconverter.cpp @@ -537,6 +537,9 @@ used.)") continue; const UnsignedInt texture = material->attribute(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;