private void MainContentOnGUI(Rect contentLayoutRect) { // Bail out if the hierarchy in animator is optimized. if (m_State.animatorIsOptimized) { Vector2 textSize = GUI.skin.label.CalcSize(AnimationWindowStyles.animatorOptimizedText); Rect labelRect = new Rect(contentLayoutRect.x + contentLayoutRect.width * .5f - textSize.x * .5f, contentLayoutRect.y + contentLayoutRect.height * .5f - textSize.y * .5f, textSize.x, textSize.y); GUI.Label(labelRect, AnimationWindowStyles.animatorOptimizedText); return; } if (m_State.disabled) { SetupWizardOnGUI(contentLayoutRect); } else { Event evt = Event.current; if (evt.type == EventType.MouseDown && contentLayoutRect.Contains(evt.mousePosition)) { m_Events.ClearSelection(); } if (triggerFraming && evt.type == EventType.Repaint) { m_DopeSheet.FrameClip(); m_CurveEditor.FrameClip(true, true); triggerFraming = false; } if (m_State.showCurveEditor) { CurveEditorOnGUI(contentLayoutRect); } else { DopeSheetOnGUI(contentLayoutRect); } } HandleCopyPaste(); }
public void FrameClip() { m_CurveEditor.InvalidateBounds(); m_CurveEditor.FrameClip(false, true); }
public void FrameClip() { m_CurveEditor.FrameClip(true, true); }