From dc22fa406150fbbde86083ae614656479448d864 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 18 Dec 2025 21:49:03 -0600 Subject: [PATCH] Fix blend shape always applying zero weight if default weight is zero. --- Source/Engine/Level/Actors/AnimatedModel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Engine/Level/Actors/AnimatedModel.cpp b/Source/Engine/Level/Actors/AnimatedModel.cpp index 343710183..f75174f72 100644 --- a/Source/Engine/Level/Actors/AnimatedModel.cpp +++ b/Source/Engine/Level/Actors/AnimatedModel.cpp @@ -668,7 +668,11 @@ void AnimatedModel::RunBlendShapeDeformer(const MeshBase* mesh, MeshDeformationD { if (q.First == blendShape.Name) { - const float weight = q.Second * blendShape.Weight; + float weight = q.Second; + if (!Math::IsZero(blendShape.Weight)) + weight *= blendShape.Weight; + if (Math::IsZero(weight)) + break; blendShapes.Add(Pair(blendShape, weight)); minVertexIndex = Math::Min(minVertexIndex, blendShape.MinVertexIndex); maxVertexIndex = Math::Max(maxVertexIndex, blendShape.MaxVertexIndex);