From dfb74baf79cf6edd746c1e4f976e3bb03ff88876 Mon Sep 17 00:00:00 2001 From: Perfare Date: Fri, 15 Jan 2021 09:32:57 +0800 Subject: [PATCH] Fix for mesh weights output --- AssetStudioUtility/ModelConverter.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/AssetStudioUtility/ModelConverter.cs b/AssetStudioUtility/ModelConverter.cs index c19b0c8..3006696 100644 --- a/AssetStudioUtility/ModelConverter.cs +++ b/AssetStudioUtility/ModelConverter.cs @@ -440,17 +440,17 @@ namespace AssetStudio } } } - else - { - //Logger.Error(""); - } } - else + if (boneType == 0) { //尝试使用m_BoneNameHashes 4.3 and up if (mesh.m_BindPose.Length > 0 && (mesh.m_BindPose.Length == mesh.m_BoneNameHashes?.Length)) { - boneType = 2; + var verifiedBoneCount = mesh.m_BoneNameHashes.Count(x => FixBonePath(GetPathFromHash(x)) != null); + if (verifiedBoneCount > 0) + { + boneType = 2; + } } }