Exemplo n.º 1
0
        public void ApplyExternalChangesToProxy()
        {
            using (new RebuildGuard(this))
            {
                if (m_OriginalOwner.curves == null)
                {
                    return;
                }

                var curveInfo = AnimationClipCurveCache.Instance.GetCurveInfo(m_OriginalOwner.curves);
                for (int i = 0; i < curveInfo.bindings.Length; i++)
                {
                    if (curveInfo.curves[i] != null && curveInfo.curves.Length != 0)
                    {
                        if (m_PropertiesMap.TryGetValue(curveInfo.bindings[i], out var prop) && AnimatedParameterUtility.IsParameterAnimatable(prop))
                        {
                            AnimationUtility.SetEditorCurve(m_ProxyCurves, curveInfo.bindings[i], curveInfo.curves[i]);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 public static bool IsParameterAnimatable(this ICurvesOwner curvesOwner, string parameterName)
 {
     return(AnimatedParameterUtility.IsParameterAnimatable(curvesOwner.asset, parameterName));
 }