using System.Collections.Generic; using KINEMATION.KAnimationCore.Runtime.Attributes; using KINEMATION.KAnimationCore.Runtime.Rig; using UnityEngine; namespace KINEMATION.MagicBlend.Runtime { public class MagicBlendAsset : ScriptableObject, IRigUser { [Header("Rig")] public KRig rigAsset; [Header("Blending")] [Min(0f)] public float blendTime = 0.15f; public AnimationCurve blendCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); [Header("Poses")] public AnimationClip basePose; public AnimationClip overlayPose; public List overrideOverlays = new List(); [Min(0f)] public float overlaySpeed = 1f; [Tooltip("If Overlay is static or not.")] public bool isAnimation; public MagicBlendOutType blendOutType; [Unfold] public List layeredBlends = new List(); [Range(0f, 1f)] public float globalWeight = 1f; public KRig GetRigAsset() { return rigAsset; } public bool HasOverrides() { if (overrideOverlays.Count == 0) { return false; } foreach (OverrideOverlay overrideOverlay in overrideOverlays) { if (overrideOverlay.overlay == null) { return false; } } return true; } } }