コード例 #1
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            FSequenceTrack sequenceTrack = (FSequenceTrack)Obj;

            if (sequenceTrack.OwnerSequence == null)
            {
                FSequence newSequence = FSequenceEditorWindow.CreateSequence();
                newSequence.transform.parent = sequenceTrack.transform;
                sequenceTrack.OwnerSequence  = newSequence;
                foreach (FPlaySequenceEvent evt in sequenceTrack.Events)
                {
                    evt.Init();
                }
            }

            if (_sequenceEditor == null)
            {
                _sequenceEditor = FSequenceEditor.CreateInstance <FSequenceEditor>();
                _sequenceEditor.Init((Editor)null /*SequenceEditor*/);
                _sequenceEditor.OpenSequence(sequenceTrack.OwnerSequence);

                //				if( Track.PreviewDirtiesScene && !Track.HasCache )
                //				{
                //					_sequenceEditor.TurnOnAllPreviews( false );
                //				}
            }
        }
コード例 #2
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);
            _playAudioEvt = (FPlayAudioEvent)obj;

            _startOffset = new SerializedObject(_playAudioEvt).FindProperty("_startOffset");
        }
コード例 #3
0
//		public List<FTrackEditor> _trackEditors = new List<FTrackEditor>();

//		[SerializeField]
//		private int[] _trackEditorIds = new int[0];

//		[SerializeField]
//		private AnimVector3 _offsetAnim = new AnimVector3();

//		private FTrackEditor _trackDragged = null;

        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            if (Timeline.Owner == null)
            {
                Timeline.Awake();
            }

            Editors.Clear();

            List <FTrack> tracks = Timeline.Tracks;

            for (int i = 0; i < tracks.Count; ++i)
            {
                FTrack       track       = tracks[i];
                FTrackEditor trackEditor = ContainerEditor.SequenceEditor.GetEditor <FTrackEditor>(track);
                trackEditor.Init(track, this);
                Editors.Add(trackEditor);
            }

            _icon = new GUIContent(FUtility.GetFluxTexture("Plus.png"));

//			_offsetAnim.valueChanged.AddListener( ContainerEditor.SequenceEditor.Repaint );
        }
コード例 #4
0
ファイル: FEventEditor.cs プロジェクト: atom-chen/luxa
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            Type evtType = obj.GetType();

            object[] customAttributes = evtType.GetCustomAttributes(typeof(FEventAttribute), false);
            if (customAttributes.Length > 0)
            {
                _isSingleFrame = ((FEventAttribute)customAttributes[0]).isSingleFrame;
            }

            if (_isSingleFrame && Evt.FrameRange.Length != 1)
            {
                FrameRange range = Evt.FrameRange;
                range.Length   = 1;
                Evt.FrameRange = range;
            }

            if (_singleFrameStyle == null)
            {
                _singleFrameStyle = FUtility.GetFluxSkin().GetStyle("SingleFrame");
            }

            GUIContent singleWidth = new GUIContent(FUtility.GetFluxTexture("SingleFrame_Active.png"));

            _singleSize = _singleFrameStyle.CalcSize(singleWidth);
        }
コード例 #5
0
ファイル: FEditorList.cs プロジェクト: wtrd1234/GameProject3
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);
            _showPercentage.valueChanged.RemoveAllListeners();
            _showPercentage.valueChanged.AddListener(SequenceEditor.Repaint);

            _contentOffset = new Vector2(8, HeaderHeight);
        }
コード例 #6
0
ファイル: FEditorCache.cs プロジェクト: wtrd1234/GameProject3
 public void Remove(FEditor editor)
 {
     if (_editorHash == null)
     {
         Refresh();
     }
     _editorHash.Remove(editor.Obj.GetInstanceID());
     _editorHashKeys.Remove(editor.Obj.GetInstanceID());
     _editorHashValues.Remove(editor);
 }
コード例 #7
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            if (_sequenceEditor == null)
            {
                _sequenceEditor = FSequenceEditor.CreateInstance <FSequenceEditor>();
                _sequenceEditor.Init((EditorWindow)null);                   // doesn't have a window
                _sequenceEditor.OpenSequence(Evt.Owner.GetComponent <FSequence>());
            }
        }
コード例 #8
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            FAnimationTrack animTrack = (FAnimationTrack)Obj;

            if (animTrack.Owner.GetComponent <Animator>() == null)
            {
                Animator animator = animTrack.Owner.gameObject.AddComponent <Animator>();
                Undo.RegisterCreatedObjectUndo(animator, string.Empty);
            }
        }
コード例 #9
0
        public virtual Rect GetGlobalRect()
        {
            Rect    r     = Rect;
            FEditor owner = Owner;

            while (owner != null)
            {
                r.x  += owner.ContentOffset.x;
                r.y  += owner.ContentOffset.y;
                owner = owner.Owner;
            }
            return(r);
        }
コード例 #10
0
        //public override float Height {
        //	get {
        //		return base.Height+base.Height;
        //	}
        //}

        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);
            _playAudioEvt = (FPlayAudioEvent)obj;
            Transform track    = _playAudioEvt.Owner;
            var       audioSrc = track.GetComponent <AudioSource>();

            if (audioSrc == null)
            {
                track.gameObject.AddComponent <AudioSource>();
            }

            _startOffset = new SerializedObject(_playAudioEvt).FindProperty("_startOffset");
        }
コード例 #11
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);
            }
        }
コード例 #12
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            if (_sequenceEditor == null)
            {
                _sequenceEditor = FSequenceEditor.CreateInstance <FSequenceEditor>();
                _sequenceEditor.Init((Editor)null /*SequenceEditor*/);
                _sequenceEditor.OpenSequence(Track.Owner.GetComponent <FSequence>());

                if (Track.PreviewDirtiesScene && !Track.HasCache)
                {
                    _sequenceEditor.TurnOnAllPreviews(false);
                }
            }
        }
コード例 #13
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            Editors.Clear();

            List <FTrack> tracks = Container.Tracks;

            for (int i = 0; i < tracks.Count; ++i)
            {
                FTrack       track       = tracks[i];
                FTrackEditor trackEditor = SequenceEditor.GetEditor <FTrackEditor>(track);
                trackEditor.Init(track, this);
                Editors.Add(trackEditor);
            }

            _icon = new GUIContent(FUtility.GetFluxTexture("Plus.png"));
        }
コード例 #14
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            Editors.Clear();

            List <FTimeline> timelines = Container.Timelines;

            for (int i = 0; i < timelines.Count; ++i)
            {
                FTimeline       timeline       = timelines[i];
                FTimelineEditor timelineEditor = SequenceEditor.GetEditor <FTimelineEditor>(timeline);
                timelineEditor.Init(timeline, this);
                Editors.Add(timelineEditor);
            }

            _icon = new GUIContent(FUtility.GetFluxTexture("Folder.png"));

//			_contentOffset = new Vector2(8, HeaderHeight);
        }
コード例 #15
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;
            }
        }
コード例 #16
0
 /* Inits the editor object.
  * obj CObject the editor manages
  */
 public virtual void Init(FObject obj, FEditor owner)
 {
     _obj   = obj;
     _owner = owner;
     _offset.valueChanged.AddListener(SequenceEditor.Repaint);
 }
コード例 #17
0
 protected virtual void OnDestroy()
 {
     _owner = null;
     _offset.valueChanged.RemoveAllListeners();
 }
コード例 #18
0
        public override void Init(FObject obj, FEditor owner)
        {
            base.Init(obj, owner);

            FAnimationTrackInspector.SetAnimator((FAnimationTrack)Track);
        }