Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move every components into Avatar Optimizer/ folder #247

Merged
merged 3 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog].
### Added

### Changed
- Move Components into `Avatar Optimizer` folder `#247`
- Previously they are `Optimizer` folder

### Deprecated

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog].
### Added

### Changed
- Move Components into `Avatar Optimizer` folder `#247`
- Previously they are `Optimizer` folder

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion Runtime/ClearEndpointPosition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/Clear Endpoint Position")]
[AddComponentMenu("Avatar Optimizer/Clear Endpoint Position")]
[RequireComponent(typeof(VRCPhysBoneBase))]
internal class ClearEndpointPosition : AvatarTagComponent
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/FreezeBlendShape.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/Freeze BlendShapes")]
[AddComponentMenu("Avatar Optimizer/Freeze BlendShapes")]
[DisallowMultipleComponent]
internal class FreezeBlendShape : EditSkinnedMeshComponent
{
Expand Down
2 changes: 2 additions & 0 deletions Runtime/MakeChildren.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using CustomLocalization4EditorExtension;
using UnityEngine;

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Avatar Optimizer/Make Children")]
internal class MakeChildren : AvatarTagComponent
{
[CL4EELocalized("MakeChildren:prop:children")]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/MergeBone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/Merge Bone")]
[AddComponentMenu("Avatar Optimizer/Merge Bone")]
[DisallowMultipleComponent]
internal class MergeBone : AvatarTagComponent
{ }
Expand Down
2 changes: 1 addition & 1 deletion Runtime/MergePhysBone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/Merge PhysBone")]
[AddComponentMenu("Avatar Optimizer/Merge PhysBone")]
[DisallowMultipleComponent]
[ExecuteAlways]
internal class MergePhysBone : AvatarTagComponent, IStaticValidated
Expand Down
2 changes: 1 addition & 1 deletion Runtime/MergeSkinnedMesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/Merge Skinned Mesh")]
[AddComponentMenu("Avatar Optimizer/Merge Skinned Mesh")]
[RequireComponent(typeof(SkinnedMeshRenderer))]
[DisallowMultipleComponent]
internal class MergeSkinnedMesh : EditSkinnedMeshComponent, IStaticValidated
Expand Down
2 changes: 1 addition & 1 deletion Runtime/MergeToonLitMaterial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/Merge Toon Lit Material")]
[AddComponentMenu("Avatar Optimizer/Merge Toon Lit Material")]
internal class MergeToonLitMaterial : EditSkinnedMeshComponent
{
public MergeInfo[] merges = Array.Empty<MergeInfo>();
Expand Down
2 changes: 1 addition & 1 deletion Runtime/RemoveMeshInBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/Remove Mesh in Box")]
[AddComponentMenu("Avatar Optimizer/Remove Mesh in Box")]
[RequireComponent(typeof(SkinnedMeshRenderer))]
[DisallowMultipleComponent]
internal class RemoveMeshInBox : EditSkinnedMeshComponent
Expand Down
2 changes: 1 addition & 1 deletion Runtime/UnusedBonesByReferencesTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Anatawa12.AvatarOptimizer
{
[AddComponentMenu("Optimizer/UnusedBonesByReferencesTool")]
[AddComponentMenu("Avatar Optimizer/UnusedBonesByReferencesTool")]
[DisallowMultipleComponent]
internal class UnusedBonesByReferencesTool : AvatarGlobalComponent
{
Expand Down
30 changes: 30 additions & 0 deletions Test~/AddComponentMenuTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
using UnityEngine;

namespace Anatawa12.AvatarOptimizer.Test
{
public class AddComponentMenuTest
{
[Test]
[TestCaseSource(nameof(ComponentTypes))]
public void CheckAddComponentMenuIsInAvatarOptimizer(Type type)
{
var addComponentMenu = type.GetCustomAttribute<AddComponentMenu>();
Assert.That(addComponentMenu, Is.Not.Null);
Assert.That(addComponentMenu.componentMenu, Does.StartWith("Avatar Optimizer/").Or.Empty);
}

static IEnumerable<Type> ComponentTypes()
{
return
typeof(AvatarTagComponent).Assembly
.GetTypes()
.Where(x => x.IsClass && !x.IsAbstract)
.Where(x => typeof(MonoBehaviour).IsAssignableFrom(x));
}
}
}
3 changes: 3 additions & 0 deletions Test~/AddComponentMenuTest.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.