From 4019916f6f578eaa2261f1a00230991b80498b17 Mon Sep 17 00:00:00 2001 From: ook3d <47336113+ook3D@users.noreply.github.com> Date: Sat, 28 Feb 2026 00:25:08 -0500 Subject: [PATCH] show polygon count in model stats --- CodeWalker.Core/GameFiles/Resources/Drawable.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Drawable.cs b/CodeWalker.Core/GameFiles/Resources/Drawable.cs index 7014ddecb..956d83016 100644 --- a/CodeWalker.Core/GameFiles/Resources/Drawable.cs +++ b/CodeWalker.Core/GameFiles/Resources/Drawable.cs @@ -3657,7 +3657,18 @@ public override Tuple[] GetParts() public override string ToString() { - return "(" + (Geometries?.Length ?? 0).ToString() + " geometr" + ((Geometries?.Length ?? 0) != 1 ? "ies)" : "y)"); + var gc = Geometries?.Length ?? 0; + uint totalPolys = 0; + uint totalVerts = 0; + if (Geometries != null) + { + for (int i = 0; i < Geometries.Length; i++) + { + totalPolys += Geometries[i].TrianglesCount; + totalVerts += Geometries[i].VerticesCount; + } + } + return "(" + gc.ToString() + " geometr" + (gc != 1 ? "ies" : "y") + ", " + totalPolys.ToString() + " polys, " + totalVerts.ToString() + " verts)"; } } @@ -3964,7 +3975,7 @@ public override IResourceBlock[] GetReferences() public override string ToString() { - return VerticesCount.ToString() + " verts, " + Shader.ToString(); + return TrianglesCount.ToString() + " polys, " + VerticesCount.ToString() + " verts, " + Shader.ToString(); } }