mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
fix: inactive menu items don't appear in RO debugger (#1291)
This commit is contained in:
parent
662172c2e5
commit
b73feb6b71
@ -22,6 +22,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
public const string BlendshapePrefix = "blendShape.";
|
public const string BlendshapePrefix = "blendShape.";
|
||||||
public const string DeletedShapePrefix = "deletedShape.";
|
public const string DeletedShapePrefix = "deletedShape.";
|
||||||
|
|
||||||
|
public bool OptimizeShapes = true;
|
||||||
|
|
||||||
public ImmutableDictionary<string, float> ForcePropertyOverrides { get; set; } = ImmutableDictionary<string, float>.Empty;
|
public ImmutableDictionary<string, float> ForcePropertyOverrides { get; set; } = ImmutableDictionary<string, float>.Empty;
|
||||||
|
|
||||||
public ImmutableDictionary<string, ModularAvatarMenuItem> ForceMenuItems { get; set; } =
|
public ImmutableDictionary<string, ModularAvatarMenuItem> ForceMenuItems { get; set; } =
|
||||||
@ -283,7 +285,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
if (info.actionGroups.Count == 0)
|
if (info.actionGroups.Count == 0)
|
||||||
{
|
{
|
||||||
// never active control; ignore it entirely
|
// never active control; ignore it entirely
|
||||||
shapes.Remove(key);
|
if (OptimizeShapes) shapes.Remove(key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +299,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
// If we're now constant-on, we can skip animation generation
|
// If we're now constant-on, we can skip animation generation
|
||||||
if (info.actionGroups[^1].IsConstant)
|
if (info.actionGroups[^1].IsConstant)
|
||||||
{
|
{
|
||||||
shapes.Remove(key);
|
if (OptimizeShapes) shapes.Remove(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,6 +264,7 @@ namespace nadena.dev.modular_avatar.core.editor.Simulator
|
|||||||
_lastComputeContext.InvokeOnInvalidate(this, MaybeRefreshUI);
|
_lastComputeContext.InvokeOnInvalidate(this, MaybeRefreshUI);
|
||||||
|
|
||||||
var analysis = new ReactiveObjectAnalyzer(_lastComputeContext);
|
var analysis = new ReactiveObjectAnalyzer(_lastComputeContext);
|
||||||
|
analysis.OptimizeShapes = false;
|
||||||
analysis.ForcePropertyOverrides = PropertyOverrides.Value;
|
analysis.ForcePropertyOverrides = PropertyOverrides.Value;
|
||||||
analysis.ForceMenuItems = MenuItemOverrides.Value;
|
analysis.ForceMenuItems = MenuItemOverrides.Value;
|
||||||
var result = analysis.Analyze(avatar.gameObject);
|
var result = analysis.Analyze(avatar.gameObject);
|
||||||
|
Loading…
Reference in New Issue
Block a user