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

Rename automatic configuration to Trace And Optimize #295

Merged
merged 6 commits into from
Aug 10, 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
Binary file not shown.
21 changes: 0 additions & 21 deletions .docs/content/docs/reference/automatic-configuration/index.ja.md

This file was deleted.

21 changes: 0 additions & 21 deletions .docs/content/docs/reference/automatic-configuration/index.md

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions .docs/content/docs/reference/trace-and-optimize/index.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Trace And Optimize
weight: 1
aliases:
- /ja/docs/reference/automatic-configuration/
---

# Trace And Optimize

<i>昔のバージョンではAutomatic Configurationという名前でした</i>

このコンポーネントは、アバターを走査して自動的にできる限りの最適化を行います。
チェックボックスで自動的に行う最適化を選択することが出来ます。

現在、以下の機能を使った自動最適化が可能です。
- [FreezeBlendShape](../freeze-blendshape)
アニメーションなどで使われていないBlendShapeを自動的に固定・除去します。
- `使われていないObjectを自動的に削除する`
アニメーションなどを走査して、使われていないObjectを自動的に削除します。

また、以下の設定で自動設定を調節できます。
- `MMDワールドとの互換性`
MMDワールドで使われるBlendShapeを固定しないなど、MMDワールドとの互換性を考慮した軽量化を行います。

![component.png](component.png)
25 changes: 25 additions & 0 deletions .docs/content/docs/reference/trace-and-optimize/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Trace And Optimize
weight: 1
aliases:
- /en/docs/reference/automatic-configuration/
---

# Trace And Optimize

<i>Previously known as Automatic Configuration</i>

This component will trace your avatar and optimize your avatar automatically.
You can enable/disable some automatic optimization features with checkboxes.

Currently the following optimizations are applied automatically.
- [FreezeBlendShape](../freeze-blendshape)
Automatically freezes unused BlendShapes in animation or else.
- `Remove unused Objects`
By scanning animation, etc., Automatically removes unused Objects.

Also, You can adjust optimization with the following settings
- `MMD World Compatibility`
Optimize with considering compatibility with MMD Worlds. e.g. Not freezing BlendShapes used by MMD Worlds.

![component.png](component.png)
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions .docs/content/docs/tutorial/basic-usage/index.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ BlendShapeを固定する {#freeze-blendshape}

AvatarOptimizer v1.2.0以降では使用されていないBlendShapeを自動的に固定する方法が追加されました!

自動的な固定のための設定は、アバターのルートに`Automatic Configuration`を追加するだけで終わりです!
自動的な固定のための設定は、アバターのルートに`Trace And Optimize`を追加するだけで終わりです!

![add-automatic-configuration.png](add-automatic-configuration.png)
![add-trace-and-optimize.png](add-trace-and-optimize.png)

`Automatic Configuration`はアニメーションなどをスキャンして使われていないBlendShapeを自動的に固定します
`Trace And Optimize`はアニメーションなどをスキャンして自動的にできる限りの最適化を行います

FX Layer等で変更していない体型変更用BlendShapeや、 表情アニメーションで利用していないBlendShape(区切り線等も)などはこの方法で問題なく固定することができます。

Expand Down
6 changes: 3 additions & 3 deletions .docs/content/docs/tutorial/basic-usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ Now let's freeze the BlendShapes for the unused body and clothing body shape cha

Since AvatarOptimizer v1.2.0, it has easy way to freeze unused BlendShapes.

The only step to enable settings for automatic freezing BlendShapes is adding `Automatic Configuration` to avatar root!
The only step to enable settings for automatic freezing BlendShapes is adding `Trace And Optimize` to avatar root!

![add-automatic-configuration.png](add-automatic-configuration.png)
![add-trace-and-optimize.png](add-trace-and-optimize.png)

`Automatic Configuration` freezes unused BlendShapes with scanning all animations and some else!
`Trace And Optimize` traces your avatar and optimize your avatar automatically.

If you don't change body BlendShape in FX Layer or else, you can easily freeze the BlendShape with this way.
Also, you can freeze unused BlendShapes in your Face Mesh.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog].
- This also adds some supported texture formats.
- Every component have `AAO` prefix in their name now `#290`
- The official shorthand for this tools is `AAO`!
- `Automatic Configuration` component has been renamed to `Trace And Optimize` `#295`

### Deprecated

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog].
- This also adds some supported texture formats.
- Every component have `AAO` prefix in their name now `#290`
- The official shorthand for this tools is `AAO`!
- `Automatic Configuration` component has been renamed to `Trace And Optimize` `#295`

### Deprecated

Expand Down
10 changes: 5 additions & 5 deletions Editor/AutomaticConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

namespace Anatawa12.AvatarOptimizer
{
[CustomEditor(typeof(AutomaticConfiguration))]
internal class AutomaticConfigurationEditor : AvatarGlobalComponentEditorBase
[CustomEditor(typeof(TraceAndOptimize))]
internal class TraceAndOptimizeEditor : AvatarGlobalComponentEditorBase
{
private SerializedProperty _freezeBlendShape;
private SerializedProperty _removeUnusedObjects;
private SerializedProperty _mmdWorldCompatibility;

private void OnEnable()
{
_freezeBlendShape = serializedObject.FindProperty(nameof(AutomaticConfiguration.freezeBlendShape));
_removeUnusedObjects = serializedObject.FindProperty(nameof(AutomaticConfiguration.removeUnusedObjects));
_mmdWorldCompatibility = serializedObject.FindProperty(nameof(AutomaticConfiguration.mmdWorldCompatibility));
_freezeBlendShape = serializedObject.FindProperty(nameof(TraceAndOptimize.freezeBlendShape));
_removeUnusedObjects = serializedObject.FindProperty(nameof(TraceAndOptimize.removeUnusedObjects));
_mmdWorldCompatibility = serializedObject.FindProperty(nameof(TraceAndOptimize.mmdWorldCompatibility));
}

protected override void OnInspectorGUIInner()
Expand Down
2 changes: 1 addition & 1 deletion Editor/OptimizerProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static void ProcessObject(OptimizerSession session)

private static void DoProcessObject(OptimizerSession session)
{
new Processors.AutomaticConfigurationProcessor().Process(session);
new Processors.TraceAndOptimizeProcessor().Process(session);
new Processors.ClearEndpointPositionProcessor().Process(session);
new Processors.MergePhysBoneProcessor().Process(session);
new Processors.EditSkinnedMeshComponentProcessor().Process(session);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Anatawa12.AvatarOptimizer.Processors
{
partial class AutomaticConfigurationProcessor
partial class TraceAndOptimizeProcessor
{
private void AutoFreezeBlendShape()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Anatawa12.AvatarOptimizer.Processors
{
partial class AutomaticConfigurationProcessor
partial class TraceAndOptimizeProcessor
{
private void GatherAnimationModifications()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Anatawa12.AvatarOptimizer.Processors
{
partial class AutomaticConfigurationProcessor
partial class TraceAndOptimizeProcessor
{
void FindUnusedObjects()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

namespace Anatawa12.AvatarOptimizer.Processors
{
internal partial class AutomaticConfigurationProcessor
internal partial class TraceAndOptimizeProcessor
{
private AutomaticConfiguration _config;
private TraceAndOptimize _config;
private OptimizerSession _session;

private Dictionary<Object, Dictionary<string, AnimationProperty>> _modifiedProperties =
Expand All @@ -17,7 +17,7 @@ internal partial class AutomaticConfigurationProcessor
public void Process(OptimizerSession session)
{
_session = session;
_config = session.GetRootComponent<AutomaticConfiguration>();
_config = session.GetRootComponent<TraceAndOptimize>();
if (!_config) return;

// TODO: implement
Expand Down
20 changes: 10 additions & 10 deletions Localization/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -317,21 +317,21 @@ msgstr "If checked, this tool does not remove bones with non-bone children."

# endregion

# region AutomaticConfiguration
# region TraceAndOptimize

msgid "AutomaticConfiguration:description"
msgstr "When you added this component to your avatar, AvatarOptimizer will configure components based on your animation or else."
msgid "TraceAndOptimize:description"
msgstr "When you added this component to your avatar, AvatarOptimizer will trace your avatar and optimize automatically."

msgid "AutomaticConfiguration:prop:freezeBlendShape"
msgstr "Configure Freeze Blend Shape"
msgid "TraceAndOptimize:prop:freezeBlendShape"
msgstr "Automatically Freeze Blend Shape"

msgid "AutomaticConfiguration:prop:mmdWorldCompatibility"
msgstr "MMD World Compatibility"
msgid "TraceAndOptimize:prop:removeUnusedObjects"
msgstr "Remove unused Objects Automatically"

msgid "AutomaticConfiguration:prop:removeUnusedObjects"
msgstr "Remove unused GameObjects"
msgid "TraceAndOptimize:prop:mmdWorldCompatibility"
msgstr "MMD World Compatibility"

msgid "AutomaticConfiguration:tooltip:mmdWorldCompatibility"
msgid "TraceAndOptimize:tooltip:mmdWorldCompatibility"
msgstr "Enable MMD World Compatibility features such as keeping some BlendShapes"

# endregion
Expand Down
18 changes: 9 additions & 9 deletions Localization/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -254,21 +254,21 @@ msgstr "チェックされている場合、子にボーン以外を持つボー

# endregion

# region AutomaticConfiguration
# region TraceAndOptimize

msgid "AutomaticConfiguration:description"
msgstr "このコンポーネントをアバターにつけると、アニメーションなどを参照して自動的にAvatarOptimizerの設定を行います。"
msgid "TraceAndOptimize:description"
msgstr "このコンポーネントをアバターにつけると、アバターを走査して自動的にできる限りの最適化を行います。"

msgid "AutomaticConfiguration:prop:freezeBlendShape"
msgstr "Freeze Blend Shapeを自動設定する"
msgid "TraceAndOptimize:prop:freezeBlendShape"
msgstr "Blend Shapeを自動的に固定・削除する"

msgid "AutomaticConfiguration:prop:removeUnusedObjects"
msgstr "使われていないGameObjectを自動的に削除する"
msgid "TraceAndOptimize:prop:removeUnusedObjects"
msgstr "使われていないObjectを自動的に削除する"

msgid "AutomaticConfiguration:prop:mmdWorldCompatibility"
msgid "TraceAndOptimize:prop:mmdWorldCompatibility"
msgstr "MMDワールドとの互換性"

msgid "AutomaticConfiguration:tooltip:mmdWorldCompatibility"
msgid "TraceAndOptimize:tooltip:mmdWorldCompatibility"
msgstr "MMD用BlendShapeを固定しないなどのMMDワールドとの互換性機能を有効化します"

# endregion
Expand Down
22 changes: 0 additions & 22 deletions Runtime/AutomaticConfiguration.cs

This file was deleted.

22 changes: 22 additions & 0 deletions Runtime/TraceAndOptimize.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using CustomLocalization4EditorExtension;
using UnityEngine;

namespace Anatawa12.AvatarOptimizer
{
// previously known as Automatic Configuration
[AddComponentMenu("Avatar Optimizer/AAO Trace And Optimize")]
[DisallowMultipleComponent]
internal class TraceAndOptimize : AvatarGlobalComponent
{
[CL4EELocalized("TraceAndOptimize:prop:freezeBlendShape")]
[ToggleLeft]
public bool freezeBlendShape = true;
[CL4EELocalized("TraceAndOptimize:prop:removeUnusedObjects")]
[ToggleLeft]
public bool removeUnusedObjects = true;
[CL4EELocalized("TraceAndOptimize:prop:mmdWorldCompatibility",
"TraceAndOptimize:tooltip:mmdWorldCompatibility")]
[ToggleLeft]
public bool mmdWorldCompatibility = true;
}
}