//!
        //! add keyframes to timeline from all curves of current selection
        //!
        public void updateTimelineKeys()
        {
            // clear
            timeLine.clearFrames();
            // add
            if (animationTarget != null && animData.getAnimationClips(animationTarget) != null)
            {
                foreach (AnimationClip clip in animData.getAnimationClips(animationTarget))
                {
                    if (animationProperties.Length > 1)
                    {
                        foreach (string prop in animationProperties)
                        {
                            AnimationCurve animCurve = animData.getAnimationCurve(clip, prop);
                            if (animCurve != null)
                            {
                                timeLine.UpdateFrames(animCurve, animationTarget.GetComponent <SceneObject>().animationLayer);
                            }
                        }
                    }
                    else
                    {
                        foreach (AnimationCurve animCurve in animData.getAnimationCurves(clip))
                        {
                            if (animCurve != null)
                            {
                                timeLine.UpdateFrames(animCurve, animationTarget.GetComponent <SceneObject>().animationLayer);
                            }
                        }
                    }
                }
            }

            timeLine.setTime(currentAnimationTime);
        }
Пример #2
0
 void Start()
 {
     timeLine.StartTime = timeLineStart;
     timeLine.EndTime   = timeLineEnd;
     timeLine.setTime(currentAnimationTime);
 }