void CreateInlineCurveEditor(WindowState state)
        {
            if (clipCurveEditor != null)
            {
                return;
            }

            var animationClip = clip.animationClip;

            if (animationClip != null && animationClip.empty)
            {
                animationClip = null;
            }

            // prune out clips coming from FBX
            if (animationClip != null && !clip.recordable)
            {
                return; // don't show, even if there are curves
            }
            if (clip.curves != null || animationClip != null)
            {
                state.AddEndFrameDelegate((istate, currentEvent) =>
                {
                    clipCurveEditor = new ClipCurveEditor(new TimelineClipCurveDataSource(this), TimelineWindow.instance);
                    return(true);
                });
            }
        }
Exemplo n.º 2
0
        void CreateInlineCurveEditor(WindowState state)
        {
            if (clipCurveEditor != null)
            {
                return;
            }

            var animationClip = clip.animationClip;

            if (animationClip != null && animationClip.empty)
            {
                animationClip = null;
            }

            // prune out clips coming from FBX
            if (animationClip != null && !clip.recordable)
            {
                return; // don't show, even if there are curves
            }
            if (animationClip == null && !clip.HasAnyAnimatableParameters())
            {
                return; // nothing to show
            }
            state.AddEndFrameDelegate((istate, currentEvent) =>
            {
                clipCurveEditor = new ClipCurveEditor(CurveDataSource.Create(this), TimelineWindow.instance, clip.GetParentTrack());
                return(true);
            });
        }