mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 12:15:05 +08:00
5359e3b006
* add referenced assembly * remove unused usings * MA Merge Blend Tree is VRC specific because it expects VRC style Animator Layer setup * PruneParametersPass is VRChat specific * fix: use FindAvatarTransformInParents() to be more cross platform * fix MergeArmatureHook: nop logic for PhysBones if we do not dedup PhysBones * fix AnimatorCombiner: ignore VRC components when non-VRC btw, is AnimatorCombiner VRC specific? * conditional compile some VRChat specific tests
41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
#if MA_VRCSDK3_AVATARS
|
|
|
|
using UnityEditor;
|
|
using UnityEditor.Animations;
|
|
using static nadena.dev.modular_avatar.core.editor.Localization;
|
|
|
|
namespace nadena.dev.modular_avatar.core.editor
|
|
{
|
|
[CustomEditor(typeof(ModularAvatarMergeBlendTree))]
|
|
internal class MergeBlendTreeEditor : MAEditorBase
|
|
{
|
|
private SerializedProperty _blendTree;
|
|
private SerializedProperty _pathMode;
|
|
private SerializedProperty _relativePathRoot;
|
|
|
|
private void OnEnable()
|
|
{
|
|
_blendTree = serializedObject.FindProperty(nameof(ModularAvatarMergeBlendTree.BlendTree));
|
|
_pathMode = serializedObject.FindProperty(nameof(ModularAvatarMergeBlendTree.PathMode));
|
|
_relativePathRoot = serializedObject.FindProperty(nameof(ModularAvatarMergeBlendTree.RelativePathRoot));
|
|
}
|
|
|
|
protected override void OnInnerInspectorGUI()
|
|
{
|
|
serializedObject.Update();
|
|
|
|
EditorGUILayout.ObjectField(_blendTree, typeof(BlendTree), G("merge_blend_tree.blend_tree"));
|
|
EditorGUILayout.PropertyField(_pathMode, G("merge_blend_tree.path_mode"));
|
|
if (_pathMode.enumValueIndex == (int) MergeAnimatorPathMode.Relative)
|
|
{
|
|
EditorGUILayout.PropertyField(_relativePathRoot, G("merge_blend_tree.relative_path_root"));
|
|
}
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
|
|
ShowLanguageUI();
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif |