Skip to content

Commit

Permalink
Merge pull request #371 from anatawa12/merge-skinned-mesh-mesh-name
Browse files Browse the repository at this point in the history
chore: Set name for AAO Generated Meshes
  • Loading branch information
anatawa12 authored Aug 23, 2023
2 parents 340cd30 + 6ba5c24 commit 2b07c12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ The format is based on [Keep a Changelog].
- If you removed some vertices with RemoveMeshInBox or RemoveMeshWithBlendShape, some BlendShape may transform no vertices
- Auto FreeseBlendShae now freezez such a BlendShapes
- Auto FreezeBlendShape now freezes vertices even if already FreezeBlendShape is configured. `#334`
- Meshes generated by AAO now have name `#371`
- This will improve compatibility with UniVRM.

### Deprecated

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ The format is based on [Keep a Changelog].
- If you removed some vertices with RemoveMeshInBox or RemoveMeshWithBlendShape, some BlendShape may transform no vertices
- Auto FreeseBlendShae now freezez such a BlendShapes
- Auto FreezeBlendShape now freezes vertices even if already FreezeBlendShape is configured. `#334`
- Meshes generated by AAO now have name `#371`
- This will improve compatibility with UniVRM.

### Deprecated

Expand Down
4 changes: 3 additions & 1 deletion Editor/Processors/SkinnedMeshes/MeshInfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ internal class MeshInfo2
public MeshInfo2(SkinnedMeshRenderer renderer)
{
SourceRenderer = renderer;
var mesh = renderer.sharedMesh ? renderer.sharedMesh : new Mesh();
var mesh = renderer.sharedMesh
? renderer.sharedMesh
: new Mesh { name = $"AAOGeneratedMesh({renderer.name})" };
ReadSkinnedMesh(mesh);

// if there's no bones: add one fake bone
Expand Down

0 comments on commit 2b07c12

Please sign in to comment.