public override void OnInspectorGUI() { if (TimelineWindow.instance == null || m_TimelineAsset == null) { return; } using (new EditorGUI.DisabledScope(IsLocked())) { EditMode.HandleModeClutch(); serializedObject.Update(); DrawClipProperties(); ApplyModifiedProperties(); } }
void OnGUI() { InitializeGUIIfRequired(); UpdateGUIConstants(); UpdateViewStateHash(); EditMode.HandleModeClutch(); // TODO We Want that here? DetectStylesChange(); DetectActiveSceneChanges(); DetectStateChanges(); state.ProcessStartFramePendingUpdates(); var clipRect = new Rect(0.0f, 0.0f, position.width, position.height); using (new GUIViewportScope(clipRect)) state.InvokeWindowOnGuiStarted(Event.current); if (Event.current.type == EventType.MouseDrag && state != null && state.mouseDragLag > 0.0f) { state.mouseDragLag -= Time.deltaTime; return; } if (PerformUndo()) { return; } if (state != null && state.ignorePreview && state.playing) { if (state.recording) { state.recording = false; } Repaint(); } clientArea = position; PlaybackScroller.AutoScroll(state); DoLayout(); // overlays if (state.captured.Count > 0) { using (new GUIViewportScope(clipRect)) { foreach (var o in state.captured) { o.Overlay(Event.current, state); } Repaint(); } } if (state.showQuadTree) { var fillColor = new Color(1.0f, 1.0f, 1.0f, 0.1f); state.spacePartitioner.DebugDraw(fillColor, Color.yellow); state.headerSpacePartitioner.DebugDraw(fillColor, Color.green); } // attempt another rebuild -- this will avoid 1 frame flashes if (Event.current.type == EventType.Repaint) { RebuildGraphIfNecessary(); state.ProcessEndFramePendingUpdates(); } using (new GUIViewportScope(clipRect)) { if (Event.current.type == EventType.Repaint) { EditMode.inputHandler.OnGUI(state, Event.current); } } if (Event.current.type == EventType.Repaint) { hierarchyChangedThisFrame = false; } }