예제 #1
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);
        }
예제 #2
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);
        }