Add AacFlState.PlayableEnables(...), PlayableDisables, and PlayableSets:
- Add AacFlState.PlayableEnables(...) with 0-duration default overload. This function is exposed with the assumption that Playable Layer Control would often be used with a all-or-nothing weight. - Add AacFlState.PlayableDisables(...) with 0-duration default overload. - Add AacFlState.PlayableSets(...) to control everything about the behaviour.
This commit is contained in:
@@ -508,6 +508,26 @@ namespace AnimatorAsCode.V0
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AacFlState PlayableEnables(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds = 0f)
|
||||||
|
{
|
||||||
|
return PlayableSets(blendable, blendDurationSeconds, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AacFlState PlayableDisables(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds = 0f)
|
||||||
|
{
|
||||||
|
return PlayableSets(blendable, blendDurationSeconds, 0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AacFlState PlayableSets(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds, float weight)
|
||||||
|
{
|
||||||
|
var playable = State.AddStateMachineBehaviour<VRCPlayableLayerControl>();
|
||||||
|
playable.layer = blendable;
|
||||||
|
playable.goalWeight = weight;
|
||||||
|
playable.blendDuration = blendDurationSeconds;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public AacFlState MotionTime(AacFlFloatParameter floatParam)
|
public AacFlState MotionTime(AacFlFloatParameter floatParam)
|
||||||
{
|
{
|
||||||
State.timeParameterActive = true;
|
State.timeParameterActive = true;
|
||||||
|
|||||||
@@ -701,6 +701,11 @@ foreach (var cancelWhenNotAllowed in new[] {auto, reverse, manual, custom, done}
|
|||||||
- `AacFlState TrackingSets(TrackingElement element, VRC_AnimatorTrackingControl.TrackingType trackingType)` /// Use an Animator Tracking Control to set the element to be the value of `trackingType`. Create an Animator Tracking Control state behaviour if it does not exist.
|
- `AacFlState TrackingSets(TrackingElement element, VRC_AnimatorTrackingControl.TrackingType trackingType)` /// Use an Animator Tracking Control to set the element to be the value of `trackingType`. Create an Animator Tracking Control state behaviour if it does not exist.
|
||||||
- `AacFlState LocomotionEnabled()` /// Enable locomotion. Create an Animator Locomotion Control if it does not exist.
|
- `AacFlState LocomotionEnabled()` /// Enable locomotion. Create an Animator Locomotion Control if it does not exist.
|
||||||
- `AacFlState LocomotionDisabled()` /// Disable locomotion. Create an Animator Locomotion Control if it does not exist.
|
- `AacFlState LocomotionDisabled()` /// Disable locomotion. Create an Animator Locomotion Control if it does not exist.
|
||||||
|
- `public AacFlState PlayableEnables(VRC_PlayableLayerControl.BlendableLayer blendable)` /// Use a Playable Layer Control to set the playable layer weight to 1, enabling it immediately. Create an Playable Layer Control no matter what.
|
||||||
|
- `public AacFlState PlayableDisables(VRC_PlayableLayerControl.BlendableLayer blendable)` /// Use a Playable Layer Control to set the playable layer weight to 0, disabling it immediately. Create an Playable Layer Control no matter what.
|
||||||
|
- `public AacFlState PlayableEnables(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds)` /// Use a Playable Layer Control to set the playable layer weight to 1, blending it over a duration, enabling it. Create an Playable Layer Control no matter what.
|
||||||
|
- `public AacFlState PlayableDisables(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds)` /// Use a Playable Layer Control to set the playable layer weight to 0, blending it over a duration, disabling it. Create an Playable Layer Control no matter what.
|
||||||
|
- `public AacFlState PlayableSets(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds, float weight)` /// Use a Playable Layer Control to set the playable layer weight to a specified value, blending it over a duration. Create an Playable Layer Control no matter what.
|
||||||
|
|
||||||
# Clip (AacFlClip)
|
# Clip (AacFlClip)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user