private void DrawClipProperties() { IEnumerable <ClipInspector.EditorClipSelection> enumerable = from s in this.m_SelectionCache where s.editorClip.GetHashCode() != s.editorClip.lastHash select s; this.UnselectCurves(); EditorGUI.BeginChangeCheck(); if (this.hasMultipleSelection) { GUILayout.Label(ClipInspector.Styles.GroupTimingTitle, new GUILayoutOption[0]); EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() + 1); this.DrawGroupSelectionProperties(); EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() - 1); EditorGUILayout.Space(); } GUILayout.Label(ClipInspector.Styles.ClipTimingTitle, new GUILayoutOption[0]); if (this.hasMultipleSelection && this.selectionHasIncompatibleCapabilities) { GUILayout.Label(ClipInspector.Styles.MultipleClipsSelectedIncompatibleCapabilitiesWarning, EditorStyles.get_helpBox(), new GUILayoutOption[0]); } EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() + 1); if (!this.m_SelectionInfo.selectionContainsAtLeastTwoClipsOnTheSameTrack) { this.DrawStartTimeProperty(); this.DrawEndTimeProperty(); } if (!this.hasMultipleSelection) { this.DrawDurationProperty(); } if (this.m_SelectionInfo.supportsBlending) { EditorGUILayout.Space(); this.DrawBlendingProperties(); } if (this.m_SelectionInfo.supportsClipIn) { EditorGUILayout.Space(); this.DrawClipInProperty(); } if (!this.hasMultipleSelection && this.m_SelectionInfo.supportsSpeedMultiplier) { EditorGUILayout.Space(); this.DrawTimeScaleProperty(); } EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() - 1); bool flag = false; foreach (ClipInspector.EditorClipSelection current in enumerable) { EditorUtility.SetDirty(current.editorClip); flag = true; } bool flag2 = false; if (EditorGUI.EndChangeCheck() || flag) { if (TimelineWindow.IsEditingTimelineAsset(this.m_TimelineAsset) && TimelineWindow.instance.state != null) { TimelineWindow.instance.state.Evaluate(); TimelineWindow.instance.Repaint(); } flag2 = true; } if (this.m_SelectionInfo.supportsExtrapolation) { EditorGUILayout.Space(); GUILayout.Label(ClipInspector.Styles.AnimationExtrapolationTitle, new GUILayoutOption[0]); EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() + 1); this.DrawExtrapolationOptions(); EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() - 1); } if (this.m_SelectionInfo.supportsBlending) { EditorGUILayout.Space(); GUILayout.Label(ClipInspector.Styles.BlendCurvesTitle, new GUILayoutOption[0]); EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() + 1); this.DrawBlendOptions(); EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() - 1); } EditorGUILayout.Space(); if (this.CanShowPlayableAssetInspector()) { this.DrawClipAssetGui(); } if (flag2) { foreach (ClipInspector.EditorClipSelection current2 in this.m_SelectionCache) { current2.editorClip.lastHash = current2.editorClip.GetHashCode(); } } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); base.get_serializedObject().Update(); bool flag = this.m_lastPosition != this.m_TrackPositionProperty.get_vector3Value() || this.m_lastRotation != this.m_TrackRotationProperty.get_quaternionValue(); this.m_lastPosition = this.m_TrackPositionProperty.get_vector3Value(); this.m_lastRotation = this.m_TrackRotationProperty.get_quaternionValue(); EditorGUI.BeginChangeCheck(); this.DrawAvatarProperties(); if (EditorGUI.EndChangeCheck()) { this.RebuildGraph(); } if (base.get_targets().Length == 1) { EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(this.m_ApplyOffsetsProperty, AnimationTrackInspector.Styles.TrackOffsetTitle, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { this.RebuildGraph(); } Animator animator = this.GetAnimator(); bool flag2 = animator == null || !TimelineAnimationUtilities.ValidateOffsetAvailabitity(base.timelineWindow.state.currentDirector, animator) || !this.m_ApplyOffsetsProperty.get_boolValue(); using (new EditorGUI.DisabledScope(flag2)) { EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() + 1); float num = 0f; float num2 = 0f; GUI.get_skin().get_button().CalcMinMaxWidth(AnimationTrackInspector.Styles.PositionIcon, ref num, ref num2); AnimationTrackInspector.ShowMotionOffsetEditModeToolbar(ref this.m_OffsetEditMode); SceneView.RepaintAll(); EditorGUI.BeginChangeCheck(); EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); EditorGUILayout.PropertyField(this.m_TrackPositionProperty, new GUILayoutOption[0]); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); AnimationPlayableAssetInspector.ShowRotationField(this.m_TrackRotationProperty); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() - 1); flag |= EditorGUI.EndChangeCheck(); if (flag) { AnimationTrack animationTrack = (AnimationTrack)base.get_target(); animationTrack.UpdateClipOffsets(); this.Evaluate(); } } } else { GUILayout.Label(AnimationTrackInspector.Styles.TrackOffsetCannotBeEditedWarning, EditorStyles.get_helpBox(), new GUILayoutOption[0]); } AnimationTrackInspector.MatchTargetsField(this.m_MatchFieldsProperty, null, null, false); base.get_serializedObject().ApplyModifiedProperties(); }