Skip to content

Commit

Permalink
Fix viseme blendshapes and eyelid blendshapes sometimes not getting r…
Browse files Browse the repository at this point in the history
…eassigned correctly if they aren't on a mesh named `Body`.
  • Loading branch information
d4rkc0d3r committed Aug 2, 2024
1 parent 20a7423 commit decba43
Show file tree
Hide file tree
Showing 3 changed files with 9 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 @@
## v3.7.4
### Bug Fixes
* Fix viseme blendshapes and eyelid blendshapes sometimes not getting reassigned correctly if they aren't on a mesh named `Body`.

## v3.7.3
### Bug Fixes
* Fix the hardcoded `_VirtualLens_Root` exclusion not working for the `Delete Unused GameObjects` option.
Expand Down
8 changes: 4 additions & 4 deletions Editor/d4rkAvatarOptimizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4557,9 +4557,9 @@ int GetNewBoneIndex(int oldIndex)
{
if (ids[i] < 0)
continue;
for (int meshID = 0; meshID < combinableSkinnedMeshes.Count; meshID++)
for (int meshID = 0; meshID < basicMergedMeshesList.Count; meshID++)
{
if (combinableSkinnedMeshes[meshID] == eyeLookMeshRenderer)
if (basicMergedMeshesList[meshID] == eyeLookMeshRenderer)
{
avDescriptor.customEyeLookSettings.eyelidsSkinnedMesh = meshRenderer;
ids[i] = combinedMesh.GetBlendShapeIndex(blendShapeMeshIDtoNewName[(meshID, ids[i])]);
Expand All @@ -4569,9 +4569,9 @@ int GetNewBoneIndex(int oldIndex)
avDescriptor.customEyeLookSettings.eyelidsBlendshapes = ids;
}

for (int meshID = 0; meshID < combinableSkinnedMeshes.Count; meshID++)
for (int meshID = 0; meshID < basicMergedMeshesList.Count; meshID++)
{
var oldVisemeMesh = combinableSkinnedMeshes[meshID];
var oldVisemeMesh = basicMergedMeshesList[meshID];
if (avDescriptor.VisemeSkinnedMesh == oldVisemeMesh)
{
avDescriptor.VisemeSkinnedMesh = meshRenderer;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "d4rkpl4y3r.d4rkavataroptimizer",
"displayName": "d4rkAvatarOptimizer",
"version": "3.7.3",
"version": "3.7.4",
"unity": "2019.4",
"description": "An optimizer aiming to reduce mesh & material count and more of VRChat 3.0 avatars.",
"dependencies": {},
Expand Down

0 comments on commit decba43

Please sign in to comment.