Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
Fix crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Williams committed Jul 28, 2022
1 parent 3ac5807 commit 1005698
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.2

- fix crashes

# 1.0.1

- ignore no visemes detected
Expand Down
13 changes: 8 additions & 5 deletions Editor/VRC3CVR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ void GetValuesFromVrcAvatar()

if (vrcVisemeBlendShapes.Length == 0)
{
Debug.Warning("Found 0 blend shapes from VRC component!");
Debug.Log("Found 0 blend shapes from VRC component!");
}

Debug.Log("Visemes: " + string.Join(", ", vrcVisemeBlendShapes));
Expand All @@ -853,10 +853,13 @@ void GetValuesFromVrcAvatar()
if (eyelidsBlendshapes.Length >= 1 && eyelidsBlendshapes[0] != -1) {
int blinkBlendshapeIdx = eyelidsBlendshapes[0];
Mesh mesh = bodySkinnedMeshRenderer.sharedMesh;

blinkBlendshapeName = mesh.GetBlendShapeName(blinkBlendshapeIdx);

Debug.Log("Blink blendshape: " + blinkBlendshapeName);

if (blinkBlendshapeIdx > mesh.blendShapeCount) {
Debug.Log("Could not use eyelid blendshape at index " + blinkBlendshapeIdx.ToString() + ": does not exist in mesh!");
} else {
blinkBlendshapeName = mesh.GetBlendShapeName(blinkBlendshapeIdx);
Debug.Log("Blink blendshape: " + blinkBlendshapeName);
}
} else {
Debug.Log("No blink blendshape set, ignoring...");
}
Expand Down

0 comments on commit 1005698

Please sign in to comment.