示例#1
0
 public void Add(FrameClipRef clip)
 {
     if (!clips.Contains(clip))
     {
         clips.Add(clip);
     }
 }
示例#2
0
        public static void MoveClipEnd(this FrameLineView view, FrameClipRef clipRef, int frame)
        {
            if (frame >= view.FrameCount)
            {
                return;
            }
            if (clipRef.Clip.Length <= 0 && frame == (view.FrameCount - 1))
            {
                return;
            }
            clipRef.Clip.Length = frame - clipRef.Clip.StartFrame + 1;
            var track = view.Asset.FindTrack(clipRef.Clip.TrackID);

            TrackUtil.UpdateClipTrackIndex(track);
        }
示例#3
0
        public static void MoveClipStart(this FrameLineView view, FrameClipRef clipRef, int frame)
        {
            if (frame < 0)
            {
                return;
            }
            int lastStart = clipRef.Clip.StartFrame;

            clipRef.Clip.StartFrame = frame;
            if (clipRef.Clip.Length > 0)
            {
                int length = clipRef.Clip.Length + (frame - lastStart);
                clipRef.Clip.Length = Mathf.Max(length, 1);
            }
            var track = view.Asset.FindTrack(clipRef.Clip.TrackID);

            TrackUtil.UpdateClipTrackIndex(track);
        }
示例#4
0
        public void RemoveClip(FrameClipRef clip)
        {
            var index = clips.FindIndex(it => it.ID == clip.ID);

            if (index >= 0)
            {
                var exist = clips[index];
                var track = tracks.Find(it => it.ID == exist.TrackID);
                if (track != null)
                {
                    track.Remove(clip);
                    if (track.Count == 0)
                    {
                        tracks.Remove(track);
                    }
                }
                clips.RemoveAt(index);
            }
        }
示例#5
0
 public bool IsSlecected(FrameClipRef clipRef)
 {
     return(SelectedClips.Contains(clipRef));
 }
示例#6
0
 public void Remove(FrameClipRef clip)
 {
     clips.Remove(clip);
 }