Ejemplo n.º 1
0
//		public void SetTimelineEditors( List<CTimelineEditor> timelineEditors )
//		{
//			_timelineEditors = timelineEditors;
//		}

        public void AddEvent(int t)
        {
            List <ISelectableElement> newEvents = new List <ISelectableElement>();

            foreach (FTimelineEditor timelineEditor in _timelineEditors)
            {
                foreach (FTrackEditor trackEditor in timelineEditor._trackEditors)
                {
                    if (!trackEditor.IsSelected())
                    {
                        continue;
                    }
                    FEvent evt = trackEditor.TryAddEvent(t);
                    if (evt)
                    {
                        FEventEditor evtEditor = GetEditor <FEventEditor>(evt);
                        evtEditor.Init(evt, trackEditor);
                        newEvents.Add(evtEditor);
                    }
                }
            }
            if (newEvents.Count > 0)
            {
                DeselectAll();
                Select(newEvents);
            }
            else
            {
                EditorApplication.Beep();
            }
        }
Ejemplo n.º 2
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            _eventEditors.Clear();

            List <FEvent> events = Track.Events;

            for (int i = 0; i < events.Count; ++i)
            {
                FEvent       evt       = events[i];
                FEventEditor evtEditor = SequenceEditor.GetEditor <FEventEditor>(evt);
                evtEditor.Init(evt, this);
                _eventEditors.Add(evtEditor);
            }
        }
Ejemplo n.º 3
0
        protected override void Init(FObject obj)
        {
            _track = (FTrack)obj;

            _eventEditors.Clear();

            List <FEvent> events = _track.GetEvents();

            for (int i = 0; i < events.Count; ++i)
            {
                FEvent       evt       = events[i];
                FEventEditor evtEditor = SequenceEditor.GetEditor <FEventEditor>(evt);
                evtEditor.Init(evt, this);
                _eventEditors.Add(evtEditor);
            }
        }
Ejemplo n.º 4
0
        public override void Init(FObject obj, FEditor owner)
        {
            bool initForFirstTime = Track == null;

            base.Init(obj, owner);

            _eventEditors.Clear();

            List <FEvent> events = Track.Events;

            for (int i = 0; i < events.Count; ++i)
            {
                FEvent       evt       = events[i];
                FEventEditor evtEditor = SequenceEditor.GetEditor <FEventEditor>(evt);
                evtEditor.Init(evt, this);
                _eventEditors.Add(evtEditor);
            }

            if (initForFirstTime && Track.PreviewDirtiesScene)
            {
                Track.CanPreview = false;
            }
        }