public void Add(FrameClipRef clip) { if (!clips.Contains(clip)) { clips.Add(clip); } }
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); }
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); }
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); } }
public bool IsSlecected(FrameClipRef clipRef) { return(SelectedClips.Contains(clipRef)); }
public void Remove(FrameClipRef clip) { clips.Remove(clip); }