Пример #1
0
//----------------------------------------------------------------------------------------------------------------------
        private static void SetMarkerValueByContext(FrameMarker frameMarker, bool value)
        {
            SISPlayableFrame        playableFrame       = frameMarker.GetOwner();
            TimelineClipSISData     timelineClipSISData = playableFrame.GetOwner();
            PlayableFramePropertyID inspectedPropertyID = timelineClipSISData.GetInspectedProperty();

            switch (inspectedPropertyID)
            {
            case PlayableFramePropertyID.USED: {
                playableFrame.SetUsed(value);
                break;
            }

            case PlayableFramePropertyID.LOCKED: {
                playableFrame.SetLocked(value);
                break;
            }
            }
        }
Пример #2
0
        internal static void ToggleMarkerValueByContext(FrameMarker frameMarker)
        {
            SISPlayableFrame        playableFrame       = frameMarker.GetOwner();
            TimelineClipSISData     timelineClipSISData = playableFrame.GetOwner();
            PlayableFramePropertyID inspectedPropertyID = timelineClipSISData.GetInspectedProperty();

            switch (inspectedPropertyID)
            {
            case PlayableFramePropertyID.USED: {
                playableFrame.SetUsed(!playableFrame.IsUsed());
                break;
            }

            case PlayableFramePropertyID.LOCKED: {
                playableFrame.SetLocked(!playableFrame.IsLocked());
                break;
            }
            }
        }
Пример #3
0
//----------------------------------------------------------------------------------------------------------------------    
    public override void DrawOverlay(IMarker m, MarkerUIStates uiState, MarkerOverlayRegion region)
    {
        FrameMarker marker = m as FrameMarker;
        if (null == marker)
            return;

        SISPlayableFrame playableFrame = marker.GetOwner();
        //Check invalid PlayableFrame. Perhaps because of unsupported Duplicate operation ?
        if (null == playableFrame)
            return;
        
        TimelineClipSISData timelineClipSISData = playableFrame.GetOwner();
        PlayableFramePropertyID inspectedPropertyID = timelineClipSISData.GetInspectedProperty();
        switch (inspectedPropertyID) {
            case PlayableFramePropertyID.USED: {
                
                if (playableFrame.IsLocked()) {
                    //At the moment, all locked frames are regarded as inactive 
                    if (playableFrame.IsUsed()) {
                        Graphics.DrawTexture(region.markerRegion, EditorTextures.GetInactiveCheckedTexture());
                    }
                    Rect lockRegion = region.markerRegion;
                    lockRegion.x -= 5;
                    lockRegion.y -= 8;
                    Graphics.DrawTexture(lockRegion, EditorTextures.GetLockTexture());                    
                } else {
                    if (playableFrame.IsUsed()) {
                        Graphics.DrawTexture(region.markerRegion, EditorTextures.GetCheckedTexture());
                    }
                    
                }
                break;
            }
            case PlayableFramePropertyID.LOCKED: {
                if (playableFrame.IsLocked()) {
                    Graphics.DrawTexture(region.markerRegion, EditorTextures.GetLockTexture());                    
                }
                break;
            }
            
        }
        
    }