void DrawSimpleClip(Rect targetRect, ClipBorder border, Color overlay) { var drawOptions = UpdateClipDrawOptions(CustomTimelineEditorCache.GetClipEditor(clip), clip); var blends = GetClipBlends(); ClipDrawer.DrawSimpleClip(clip, targetRect, border, overlay, drawOptions, blends); }
static void DrawBorderOfAddedRecordingClip(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) { if (!state.IsArmedForRecord(trackAsset)) { return; } AnimationTrack animTrack = trackAsset as AnimationTrack; if (animTrack == null || !animTrack.inClipMode) { return; } // make sure there is no clip but we can add one TimelineClip clip = null; if (trackAsset.FindRecordingClipAtTime(state.editSequence.time, out clip) || clip != null) { return; } float yMax = trackRect.yMax; float yMin = trackRect.yMin; double startGap = 0; double endGap = 0; trackAsset.GetGapAtTime(state.editSequence.time, out startGap, out endGap); if (double.IsInfinity(endGap)) { endGap = visibleTime.y; } if (startGap > visibleTime.y || endGap < visibleTime.x) { return; } startGap = Math.Max(startGap, visibleTime.x); endGap = Math.Min(endGap, visibleTime.y); float xMin = state.TimeToPixel(startGap); float xMax = state.TimeToPixel(endGap); Rect r = Rect.MinMaxRect(xMin, yMin, xMax, yMax); ClipDrawer.DrawBorder(r, ClipBorder.kRecording, ClipBlends.kNone); }
static void DrawClip(ClipDrawData drawData) { ClipDrawer.DrawDefaultClip(drawData); if (drawData.clip.asset is AnimationPlayableAsset) { var state = TimelineWindow.instance.state; if (state.recording && state.IsArmedForRecord(drawData.clip.GetParentTrack())) { ClipDrawer.DrawAnimationRecordBorder(drawData); ClipDrawer.DrawRecordProhibited(drawData); } } }
void DrawAnimationRecordBorder(ClipDrawData drawData) { if (!drawData.clip.parentTrack.IsRecordingToClip(drawData.clip)) { return; } if (drawData.state.editSequence.time < drawData.clip.start + drawData.clip.mixInDuration || drawData.state.editSequence.time > drawData.clip.end - drawData.clip.mixOutDuration) { return; } ClipDrawer.DrawBorder(drawData.clipCenterSection, ClipBorder.kRecording, ClipBlends.kNone); }
public static void DrawAnimationRecordBorder(ClipDrawData drawData) { if (!drawData.clip.parentTrack.IsRecordingToClip(drawData.clip)) { return; } double time = TimelineWindow.instance.state.editSequence.time; if (time < drawData.clip.start + drawData.clip.mixInDuration || time > drawData.clip.end - drawData.clip.mixOutDuration) { return; } ClipDrawer.DrawBorder(drawData.clipCenterSection, ClipBorder.kRecording, ClipBlends.kNone); }
public virtual void DrawClip(ClipDrawData drawData) { ClipDrawer.DrawDefaultClip(drawData, GetClipDrawing(drawData.clip), BlendsFromGUI(drawData.uiClip)); }
public static void DrawSimpleClip(TimelineClipGUI clip, Rect targetRect, ClipBorder border, Color overlay, ClipDrawing drawing) { ClipDrawer.DrawSimpleClip(clip.clip, targetRect, border, overlay, drawing, BlendsFromGUI(clip)); }