示例#1
0
        internal override void OnHeaderTitleGUI(Rect titleRect, string header)
        {
            if (targets.Length > 1)
            {
                var multiSelectTitle = string.Format(Styles.MultipleMarkerSelectionTitle, targets.Length);
                base.OnHeaderTitleGUI(titleRect, multiSelectTitle);
                return;
            }

            var marker = target as Marker;

            if (marker != null)
            {
                if (marker.parent.GetShowMarkers() && TimelineUtility.IsCurrentSequenceValid() && !IsCurrentSequenceReadOnly())
                {
                    EditorGUI.BeginChangeCheck();
                    var newName = EditorGUI.DelayedTextField(titleRect, marker.name);
                    if (EditorGUI.EndChangeCheck())
                    {
                        UndoExtensions.RegisterMarker(marker, Styles.UndoCommand);
                        marker.name = newName;
                    }
                }
                else
                {
                    base.OnHeaderTitleGUI(titleRect, marker.name);
                }
            }
            else
            {
                var typeName = TypeUtility.GetDisplayName(target.GetType());
                EditorGUILayout.LabelField(typeName);
            }
        }
        bool IsLocked()
        {
            if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly())
            {
                return(true);
            }

            return(targets.OfType <EditorClip>().Any(t => t.clip.GetParentTrack() != null && t.clip.GetParentTrack().lockedInHierarchy));
        }
        protected bool IsTrackLocked()
        {
            if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly())
            {
                return(true);
            }

            return(targets.Any(track => ((TrackAsset)track).lockedInHierarchy));
        }
        internal override bool IsEnabled()
        {
            if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly())
            {
                return(false);
            }

            if (m_TimelineAsset != TimelineWindow.instance.state.editSequence.asset)
            {
                return(false);
            }
            return(base.IsEnabled());
        }
示例#5
0
        internal override bool IsEnabled()
        {
            if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly())
            {
                return(false);
            }
            var marker = target as Marker;

            if (marker != null)
            {
                if (!marker.parent.GetShowMarkers())
                {
                    return(false);
                }
            }
            return(base.IsEnabled());
        }
 internal override bool IsEnabled()
 {
     return(TimelineUtility.IsCurrentSequenceValid() && !IsCurrentSequenceReadOnly() && base.IsEnabled());
 }