From c2f390071a044d122bcd08376e915bc953d37dd7 Mon Sep 17 00:00:00 2001 From: bd_ Date: Mon, 7 Nov 2022 20:20:18 -0800 Subject: [PATCH] Remove some excessive debug --- .../Editor/FirstPersonVisibleMeshProcessor.cs | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/Packages/net.fushizen.modular-avatar/Editor/FirstPersonVisibleMeshProcessor.cs b/Packages/net.fushizen.modular-avatar/Editor/FirstPersonVisibleMeshProcessor.cs index 07daaf90..2defc1c4 100644 --- a/Packages/net.fushizen.modular-avatar/Editor/FirstPersonVisibleMeshProcessor.cs +++ b/Packages/net.fushizen.modular-avatar/Editor/FirstPersonVisibleMeshProcessor.cs @@ -56,15 +56,7 @@ namespace net.fushizen.modular_avatar.core.editor AnalyzeManifolds(); // Bail out early if the bones are unused if (!anyVisible) return; -/* - var vcol = new List(); - for (int v = 0; v < vertexCount; v++) - { - var n = nodes[v].Find(); - //vcol.Add(new Color((byte) (nodes[v].HasRetargetedBone ? 1 : 0), (byte) (nodes[v].HasVisibleBone ? 1 : 0), nodes[v].b, 1)); - vcol.Add(new Color(n.HasRetargetedBone ? 1 : 0, n.HasVisibleBone ? 1 : 0, 0, 1)); - } -*/ + // Now construct a new bone weight array var bindposes = new List(); originalMesh.GetBindposes(bindposes); @@ -98,7 +90,6 @@ namespace net.fushizen.modular_avatar.core.editor int newIndex = RemapBone(weight.boneIndex); weight.boneIndex = newIndex; newWeights.Add(weight); - //vcol[v] = vcol[v] + Color.blue; } } @@ -188,23 +179,6 @@ namespace net.fushizen.modular_avatar.core.editor nodes[indices[t]].Union(nodes[indices[t + 2]]); } } - - HashSet roots = new HashSet(); - - for (int i = 0; i < vertexCount; i++) - { - var root = nodes[i].Find(); - roots.Add(root); - } - - Debug.Log("=== " + originalMesh.name + " ==="); - int index = 0; - foreach (var r in roots.OrderByDescending(r => r.Rank)) - { - Debug.Log("Root: " + r.Rank + " rank" + (r.HasVisibleBone ? " visible" : "") + - (r.HasRetargetedBone ? " retargeted" : "")); - r.b = index++ / (float) roots.Count; - } } }