mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-12 15:38:59 +08:00
Merge branch 'main' of github.com:JLChnToZ/modular-avatar
This commit is contained in:
commit
91b4414e60
@ -158,6 +158,7 @@ namespace nadena.dev.modular_avatar.animation
|
|||||||
|
|
||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
var avatarDescriptor = context.AvatarDescriptor;
|
var avatarDescriptor = context.AvatarDescriptor;
|
||||||
|
if (!avatarDescriptor) return;
|
||||||
|
|
||||||
foreach (var layer in avatarDescriptor.baseAnimationLayers)
|
foreach (var layer in avatarDescriptor.baseAnimationLayers)
|
||||||
{
|
{
|
||||||
|
@ -92,6 +92,8 @@ namespace nadena.dev.modular_avatar.animation
|
|||||||
public void AddPropertyDefinition(AnimatorControllerParameter paramDef)
|
public void AddPropertyDefinition(AnimatorControllerParameter paramDef)
|
||||||
{
|
{
|
||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
if (!_context.AvatarDescriptor) return;
|
||||||
|
|
||||||
var fx = (AnimatorController)
|
var fx = (AnimatorController)
|
||||||
_context.AvatarDescriptor.baseAnimationLayers
|
_context.AvatarDescriptor.baseAnimationLayers
|
||||||
.First(l => l.type == VRCAvatarDescriptor.AnimLayerType.FX)
|
.First(l => l.type == VRCAvatarDescriptor.AnimLayerType.FX)
|
||||||
|
@ -53,6 +53,8 @@ namespace nadena.dev.modular_avatar.animation
|
|||||||
// This helps reduce the risk that we'll accidentally modify the original assets.
|
// This helps reduce the risk that we'll accidentally modify the original assets.
|
||||||
|
|
||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
if (!context.AvatarDescriptor) return;
|
||||||
|
|
||||||
context.AvatarDescriptor.baseAnimationLayers =
|
context.AvatarDescriptor.baseAnimationLayers =
|
||||||
CloneLayers(context, context.AvatarDescriptor.baseAnimationLayers);
|
CloneLayers(context, context.AvatarDescriptor.baseAnimationLayers);
|
||||||
context.AvatarDescriptor.specialAnimationLayers =
|
context.AvatarDescriptor.specialAnimationLayers =
|
||||||
|
@ -369,21 +369,24 @@ namespace nadena.dev.modular_avatar.animation
|
|||||||
Profiler.EndSample();
|
Profiler.EndSample();
|
||||||
|
|
||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
var layers = context.AvatarDescriptor.baseAnimationLayers
|
if (context.AvatarDescriptor)
|
||||||
.Concat(context.AvatarDescriptor.specialAnimationLayers);
|
|
||||||
|
|
||||||
Profiler.BeginSample("ApplyMappingsToAvatarMasks");
|
|
||||||
foreach (var layer in layers)
|
|
||||||
{
|
{
|
||||||
ApplyMappingsToAvatarMask(layer.mask);
|
var layers = context.AvatarDescriptor.baseAnimationLayers
|
||||||
|
.Concat(context.AvatarDescriptor.specialAnimationLayers);
|
||||||
|
|
||||||
if (layer.animatorController is AnimatorController ac)
|
Profiler.BeginSample("ApplyMappingsToAvatarMasks");
|
||||||
// By this point, all AnimationOverrideControllers have been collapsed into an ephemeral
|
foreach (var layer in layers)
|
||||||
// AnimatorController so we can safely modify the controller in-place.
|
{
|
||||||
foreach (var acLayer in ac.layers)
|
ApplyMappingsToAvatarMask(layer.mask);
|
||||||
ApplyMappingsToAvatarMask(acLayer.avatarMask);
|
|
||||||
|
if (layer.animatorController is AnimatorController ac)
|
||||||
|
// By this point, all AnimationOverrideControllers have been collapsed into an ephemeral
|
||||||
|
// AnimatorController so we can safely modify the controller in-place.
|
||||||
|
foreach (var acLayer in ac.layers)
|
||||||
|
ApplyMappingsToAvatarMask(acLayer.avatarMask);
|
||||||
|
}
|
||||||
|
Profiler.EndSample();
|
||||||
}
|
}
|
||||||
Profiler.EndSample();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Profiler.EndSample();
|
Profiler.EndSample();
|
||||||
|
@ -19,6 +19,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
internal static void FixupExpressionsMenu(BuildContext context)
|
internal static void FixupExpressionsMenu(BuildContext context)
|
||||||
{
|
{
|
||||||
|
if (!context.AvatarDescriptor) return;
|
||||||
|
|
||||||
context.AvatarDescriptor.customExpressions = true;
|
context.AvatarDescriptor.customExpressions = true;
|
||||||
|
|
||||||
var expressionsMenu = context.AvatarDescriptor.expressionsMenu;
|
var expressionsMenu = context.AvatarDescriptor.expressionsMenu;
|
||||||
|
@ -65,6 +65,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
mergeSessions.Clear();
|
mergeSessions.Clear();
|
||||||
|
|
||||||
var descriptor = avatarGameObject.GetComponent<VRCAvatarDescriptor>();
|
var descriptor = avatarGameObject.GetComponent<VRCAvatarDescriptor>();
|
||||||
|
if (!descriptor) return;
|
||||||
|
|
||||||
if (descriptor.baseAnimationLayers != null) InitSessions(descriptor.baseAnimationLayers);
|
if (descriptor.baseAnimationLayers != null) InitSessions(descriptor.baseAnimationLayers);
|
||||||
if (descriptor.specialAnimationLayers != null) InitSessions(descriptor.specialAnimationLayers);
|
if (descriptor.specialAnimationLayers != null) InitSessions(descriptor.specialAnimationLayers);
|
||||||
|
@ -11,30 +11,51 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
{
|
{
|
||||||
private static ComputeContext _context;
|
private static ComputeContext _context;
|
||||||
|
|
||||||
private static PrefabStage _lastStage;
|
private static int? _lastStage;
|
||||||
|
|
||||||
|
private static int? GetCurrentContentsRootId(out GameObject contentsRoot)
|
||||||
|
{
|
||||||
|
contentsRoot = null;
|
||||||
|
|
||||||
|
var stage = PrefabStageUtility.GetCurrentPrefabStage();
|
||||||
|
if (stage == null || stage.prefabContentsRoot == null) return null;
|
||||||
|
|
||||||
|
contentsRoot = stage.prefabContentsRoot;
|
||||||
|
|
||||||
|
return stage.prefabContentsRoot.GetInstanceID();
|
||||||
|
}
|
||||||
|
|
||||||
[InitializeOnLoadMethod]
|
[InitializeOnLoadMethod]
|
||||||
private static void Init()
|
private static void Init()
|
||||||
{
|
{
|
||||||
EditorApplication.delayCall += ProcessObjectReferences;
|
EditorApplication.delayCall += ProcessObjectReferences;
|
||||||
EditorApplication.update += () =>
|
EditorApplication.update += () =>
|
||||||
{
|
{
|
||||||
if (PrefabStageUtility.GetCurrentPrefabStage() != _lastStage) _context?.Invalidate?.Invoke();
|
var curStage = GetCurrentContentsRootId(out _);
|
||||||
|
|
||||||
|
Debug.Log($"{_lastStage} => {curStage}");
|
||||||
|
|
||||||
|
if (curStage != _lastStage)
|
||||||
|
{
|
||||||
|
_context?.Invalidate?.Invoke();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ProcessObjectReferences()
|
private static void ProcessObjectReferences()
|
||||||
{
|
{
|
||||||
_lastStage = PrefabStageUtility.GetCurrentPrefabStage();
|
_lastStage = GetCurrentContentsRootId(out var contentsRoot);
|
||||||
|
|
||||||
|
AvatarObjectReference.InvalidateAll();
|
||||||
|
|
||||||
_context = new ComputeContext("ObjectReferenceFixer");
|
_context = new ComputeContext("ObjectReferenceFixer");
|
||||||
_context.InvokeOnInvalidate<object>(typeof(ObjectReferenceFixer), _ => ProcessObjectReferences());
|
_context.InvokeOnInvalidate<object>(typeof(ObjectReferenceFixer), _ => ProcessObjectReferences());
|
||||||
|
|
||||||
IEnumerable<IHaveObjReferences> withReferences = _context.GetComponentsByType<IHaveObjReferences>();
|
IEnumerable<IHaveObjReferences> withReferences = _context.GetComponentsByType<IHaveObjReferences>();
|
||||||
if (_lastStage != null)
|
if (contentsRoot != null)
|
||||||
withReferences =
|
withReferences =
|
||||||
withReferences.Concat(
|
withReferences.Concat(
|
||||||
_context.GetComponentsInChildren<IHaveObjReferences>(_lastStage.prefabContentsRoot, true)
|
_context.GetComponentsInChildren<IHaveObjReferences>(contentsRoot, true)
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach (var obj in withReferences)
|
foreach (var obj in withReferences)
|
||||||
@ -56,10 +77,26 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
|
|
||||||
foreach (var (targetObject, referencePath, objRef) in references)
|
foreach (var (targetObject, referencePath, objRef) in references)
|
||||||
{
|
{
|
||||||
if (targetObject == null) continue;
|
var resolvedTarget = objRef.Get(component);
|
||||||
_context.ObservePath(targetObject.transform);
|
if (objRef.Get(component) == null) continue;
|
||||||
|
if (targetObject == null)
|
||||||
|
{
|
||||||
|
Undo.RecordObject(component, "");
|
||||||
|
objRef.targetObject = resolvedTarget;
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Direct object reference always wins in the event of a conflict.
|
||||||
|
resolvedTarget = targetObject;
|
||||||
|
}
|
||||||
|
|
||||||
if (!targetObject.transform.IsChildOf(avatar.transform)) continue;
|
foreach (var t in _context.ObservePath(resolvedTarget.transform))
|
||||||
|
{
|
||||||
|
_context.Observe(t.gameObject, g => g.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!resolvedTarget.transform.IsChildOf(avatar.transform)) continue;
|
||||||
|
|
||||||
if (objRef.IsConsistent(avatar)) continue;
|
if (objRef.IsConsistent(avatar)) continue;
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
{
|
{
|
||||||
protected override void Execute(ndmf.BuildContext context)
|
protected override void Execute(ndmf.BuildContext context)
|
||||||
{
|
{
|
||||||
|
if (!context.AvatarDescriptor) return;
|
||||||
|
|
||||||
var expParams = context.AvatarDescriptor.expressionParameters;
|
var expParams = context.AvatarDescriptor.expressionParameters;
|
||||||
if (expParams != null && context.IsTemporaryAsset(expParams))
|
if (expParams != null && context.IsTemporaryAsset(expParams))
|
||||||
{
|
{
|
||||||
|
@ -34,6 +34,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
internal void Execute()
|
internal void Execute()
|
||||||
{
|
{
|
||||||
|
if (!context.AvatarDescriptor) return;
|
||||||
|
|
||||||
// Having a WD OFF layer after WD ON layers can break WD. We match the behavior of the existing states,
|
// Having a WD OFF layer after WD ON layers can break WD. We match the behavior of the existing states,
|
||||||
// and if mixed, use WD ON to maximize compatibility.
|
// and if mixed, use WD ON to maximize compatibility.
|
||||||
_writeDefaults = MergeAnimatorProcessor.ProbeWriteDefaults(FindFxController().animatorController as AnimatorController) ?? true;
|
_writeDefaults = MergeAnimatorProcessor.ProbeWriteDefaults(FindFxController().animatorController as AnimatorController) ?? true;
|
||||||
|
@ -159,6 +159,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
public void OnPreprocessAvatar(GameObject avatar, BuildContext context)
|
public void OnPreprocessAvatar(GameObject avatar, BuildContext context)
|
||||||
{
|
{
|
||||||
|
if (!context.AvatarDescriptor) return;
|
||||||
|
|
||||||
_context = context;
|
_context = context;
|
||||||
|
|
||||||
var syncParams = WalkTree(avatar);
|
var syncParams = WalkTree(avatar);
|
||||||
|
@ -29,6 +29,11 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
EditorApplication.hierarchyChanged += () => HIERARCHY_CHANGED_SEQ += 1;
|
EditorApplication.hierarchyChanged += () => HIERARCHY_CHANGED_SEQ += 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
internal static void InvalidateAll()
|
||||||
|
{
|
||||||
|
HIERARCHY_CHANGED_SEQ++;
|
||||||
|
}
|
||||||
|
|
||||||
public AvatarObjectReference Clone()
|
public AvatarObjectReference Clone()
|
||||||
{
|
{
|
||||||
|
@ -218,6 +218,8 @@ namespace nadena.dev.modular_avatar.core.ArmatureAwase
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (transform.parent == null) return;
|
||||||
|
|
||||||
var pos = transform.localPosition;
|
var pos = transform.localPosition;
|
||||||
var rot = transform.localRotation;
|
var rot = transform.localRotation;
|
||||||
var scale = transform.localScale;
|
var scale = transform.localScale;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using nadena.dev.modular_avatar.core.editor;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using nadena.dev.modular_avatar.core.editor;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -36,4 +38,6 @@ namespace modular_avatar_tests
|
|||||||
Assert.AreEqual("x", curves[0].propertyName);
|
Assert.AreEqual("x", curves[0].propertyName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using System;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using nadena.dev.ndmf;
|
using nadena.dev.ndmf;
|
||||||
@ -158,4 +160,6 @@ namespace modular_avatar_tests
|
|||||||
Assert.IsFalse(state.transformMaskElements.Any(e => e.Item1 == "Armature/Hips/UpperLeg.R"));
|
Assert.IsFalse(state.transformMaskElements.Any(e => e.Item1 == "Armature/Hips/UpperLeg.R"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using System.Linq;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
using nadena.dev.ndmf;
|
using nadena.dev.ndmf;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using UnityEditor.Animations;
|
using UnityEditor.Animations;
|
||||||
@ -26,4 +28,6 @@ namespace modular_avatar_tests
|
|||||||
Assert.AreEqual(desiredIndex, alc.layer);
|
Assert.AreEqual(desiredIndex, alc.layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,9 +1,10 @@
|
|||||||
using nadena.dev.modular_avatar.core.editor;
|
#if MA_VRCSDK3_AVATARS_3_5_2_OR_NEWER
|
||||||
|
|
||||||
|
using nadena.dev.modular_avatar.core.editor;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using UnityEditor.Animations;
|
using UnityEditor.Animations;
|
||||||
using VRC.SDK3.Avatars.Components;
|
using VRC.SDK3.Avatars.Components;
|
||||||
|
|
||||||
#if MA_VRCSDK3_AVATARS_3_5_2_OR_NEWER
|
|
||||||
namespace modular_avatar_tests
|
namespace modular_avatar_tests
|
||||||
{
|
{
|
||||||
public class PlayAudioRemapping : TestBase
|
public class PlayAudioRemapping : TestBase
|
||||||
@ -28,4 +29,5 @@ namespace modular_avatar_tests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using modular_avatar_tests;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using modular_avatar_tests;
|
||||||
using nadena.dev.modular_avatar.animation;
|
using nadena.dev.modular_avatar.animation;
|
||||||
using nadena.dev.modular_avatar.core;
|
using nadena.dev.modular_avatar.core;
|
||||||
using nadena.dev.modular_avatar.core.editor;
|
using nadena.dev.modular_avatar.core.editor;
|
||||||
@ -47,4 +49,6 @@ namespace UnitTests.MergeAnimatorTests
|
|||||||
Assert.IsTrue(state.motion.name.StartsWith("Anim2"));
|
Assert.IsTrue(state.motion.name.StartsWith("Anim2"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,3 +1,5 @@
|
|||||||
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -35,3 +37,4 @@ public class PreexistingParamsTest : TestBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using modular_avatar_tests;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using modular_avatar_tests;
|
||||||
using nadena.dev.modular_avatar.core;
|
using nadena.dev.modular_avatar.core;
|
||||||
using nadena.dev.modular_avatar.core.editor;
|
using nadena.dev.modular_avatar.core.editor;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@ -25,4 +27,6 @@ namespace UnitTests.MergeAnimatorTests.ProxyAnim
|
|||||||
Assert.AreEqual(originalClip, resultClip);
|
Assert.AreEqual(originalClip, resultClip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using modular_avatar_tests;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using modular_avatar_tests;
|
||||||
using nadena.dev.ndmf;
|
using nadena.dev.ndmf;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using UnityEditor.Animations;
|
using UnityEditor.Animations;
|
||||||
@ -38,4 +40,6 @@ namespace UnitTests.MergeAnimatorTests.SyncedLayerOverrideInSubStatemachine
|
|||||||
Assert.NotNull(motion);
|
Assert.NotNull(motion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,3 +1,5 @@
|
|||||||
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -268,3 +270,4 @@ public class ConvertTransitionTypes : TestBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,3 +1,5 @@
|
|||||||
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
@ -24,3 +26,5 @@ public class MergeDirectBlendTreeTests : TestBase
|
|||||||
Assert.AreEqual(0, parameters["DEF"]);
|
Assert.AreEqual(0, parameters["DEF"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using System.Linq;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
using modular_avatar_tests;
|
using modular_avatar_tests;
|
||||||
using nadena.dev.modular_avatar.core.editor;
|
using nadena.dev.modular_avatar.core.editor;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@ -58,4 +60,6 @@ namespace UnitTests.ReactiveComponent
|
|||||||
Assert.AreEqual(m3.actionGroups, m1.actionGroups);
|
Assert.AreEqual(m3.actionGroups, m1.actionGroups);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using System.Linq;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
using modular_avatar_tests;
|
using modular_avatar_tests;
|
||||||
using nadena.dev.modular_avatar.core;
|
using nadena.dev.modular_avatar.core;
|
||||||
using nadena.dev.modular_avatar.core.editor;
|
using nadena.dev.modular_avatar.core.editor;
|
||||||
@ -47,4 +49,6 @@ namespace UnitTests.ReactiveComponent
|
|||||||
Assert.IsFalse(obj.activeSelf);
|
Assert.IsFalse(obj.activeSelf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using System;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using modular_avatar_tests;
|
using modular_avatar_tests;
|
||||||
@ -112,4 +114,6 @@ namespace UnitTests.ReactiveComponent.ParameterAssignment
|
|||||||
Assert.AreEqual(expectedDefaultValue, avDesc.expressionParameters.parameters.Single().defaultValue);
|
Assert.AreEqual(expectedDefaultValue, avDesc.expressionParameters.parameters.Single().defaultValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using System;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using modular_avatar_tests;
|
using modular_avatar_tests;
|
||||||
using nadena.dev.modular_avatar.core;
|
using nadena.dev.modular_avatar.core;
|
||||||
@ -82,4 +84,6 @@ namespace UnitTests.ReactiveComponent.ParameterAssignment
|
|||||||
Assert.AreEqual(expected, descriptor.expressionParameters.parameters.Single().valueType);
|
Assert.AreEqual(expected, descriptor.expressionParameters.parameters.Single().valueType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,3 +1,5 @@
|
|||||||
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -96,3 +98,5 @@ public class ShapeDeletionAnalysis : TestBase
|
|||||||
Assert.AreEqual(originalSharedMesh, mesh.sharedMesh);
|
Assert.AreEqual(originalSharedMesh, mesh.sharedMesh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using modular_avatar_tests;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using modular_avatar_tests;
|
||||||
using nadena.dev.modular_avatar.animation;
|
using nadena.dev.modular_avatar.animation;
|
||||||
using nadena.dev.modular_avatar.core.editor;
|
using nadena.dev.modular_avatar.core.editor;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@ -121,4 +123,6 @@ namespace ShapeChangerTests
|
|||||||
Assert.AreEqual(100.0f, smr.GetBlendShapeWeight(sharedMesh.GetBlendShapeIndex("key3")), 0.1f);
|
Assert.AreEqual(100.0f, smr.GetBlendShapeWeight(sharedMesh.GetBlendShapeIndex("key3")), 0.1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
#if MA_VRCSDK3_AVATARS
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -57,4 +59,6 @@ namespace UnitTests.VisibleHeadAccessoryTest
|
|||||||
Assert.AreEqual(headchop.globalScaleFactor, 1);
|
Assert.AreEqual(headchop.globalScaleFactor, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -28,10 +28,10 @@ Mesh Settingsコンポーネントを使用すると、特定のゲームオブ
|
|||||||
- 継承:このコンポーネントはこの設定に対して何もしません。親のMesh Settingsで設定された値を継承します。
|
- 継承:このコンポーネントはこの設定に対して何もしません。親のMesh Settingsで設定された値を継承します。
|
||||||
- 設定:このコンポーネントは、そのゲームオブジェクトとその子にあるメッシュの対応する設定を設定します。
|
- 設定:このコンポーネントは、そのゲームオブジェクトとその子にあるメッシュの対応する設定を設定します。
|
||||||
- 設定しない:このコンポーネントは、親のMesh Settingsの影響を受けないようにします。メッシュはデフォルトの設定のままです。
|
- 設定しない:このコンポーネントは、親のMesh Settingsの影響を受けないようにします。メッシュはデフォルトの設定のままです。
|
||||||
- 親が継承された時は継承、または設定:親のMesh Settingsが設定モードにある場合、それが使用されます。親のMesh
|
- 親が継承された時は継承、それ以外では設定:親のMesh Settingsが設定モードにある場合、それが使用されます。親のMesh
|
||||||
Settingsが適用されない場合、
|
Settingsが適用されない場合、
|
||||||
このコンポーネントの設定が使用されます。衣装プレハブなどに、アバター全体の設定が優先されるようにするために便利です。
|
このコンポーネントの設定が使用されます。衣装プレハブなどに、アバター全体の設定が優先されるようにするために便利です。
|
||||||
|
|
||||||
バウンズを設定する場合、バウンディングボックスは「Root Bone」として指定したトランスフォームに対して相対的に決定されます。
|
バウンズを設定する場合、バウンディングボックスは「Root Bone」として指定したトランスフォームに対して相対的に決定されます。
|
||||||
また、バウンズはSkinned Mesh Rendererのみに影響しますが、Anchor OverrideはMesh RendererやLine Rendererなどの他のタイプの
|
また、バウンズはSkinned Mesh Rendererのみに影響しますが、Anchor OverrideはMesh RendererやLine Rendererなどの他のタイプの
|
||||||
Rendererにも設定されます。
|
Rendererにも設定されます。
|
||||||
|
@ -6378,8 +6378,8 @@ __metadata:
|
|||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"http-proxy-middleware@npm:^2.0.3":
|
"http-proxy-middleware@npm:^2.0.3":
|
||||||
version: 2.0.6
|
version: 2.0.7
|
||||||
resolution: "http-proxy-middleware@npm:2.0.6"
|
resolution: "http-proxy-middleware@npm:2.0.7"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/http-proxy": ^1.17.8
|
"@types/http-proxy": ^1.17.8
|
||||||
http-proxy: ^1.18.1
|
http-proxy: ^1.18.1
|
||||||
@ -6391,7 +6391,7 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@types/express":
|
"@types/express":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 2ee85bc878afa6cbf34491e972ece0f5be0a3e5c98a60850cf40d2a9a5356e1fc57aab6cff33c1fc37691b0121c3a42602d2b1956c52577e87a5b77b62ae1c3a
|
checksum: 18caa21145917aa1054740353916e8f03f5a3a93bede9106f1f44d84f7b174df17af1c72bf5fade5cc440c2058ee813f47cbb2bdd6ae6874af1cf33e0ac575f3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user