Exemple #1
0
//----------------------------------------------------------------------------------------------------------------------

        internal static void LockAndEditPlayableFrame(SISPlayableFrame playableFrame,
                                                      RenderCachePlayableAsset renderCachePlayableAsset)
        {
            int    index    = playableFrame.GetIndex();
            string filePath = renderCachePlayableAsset.GetImageFilePath(index);

            if (string.IsNullOrEmpty(filePath) || !File.Exists(filePath))
            {
                EditorUtility.DisplayDialog(StreamingImageSequenceConstants.DIALOG_HEADER,
                                            "Please update RenderCachePlayableAsset.",
                                            "Ok");
                return;
            }

            string fullPath = Path.GetFullPath(filePath);

            playableFrame.SetLocked(true);
            string imageAppPath = EditorPrefs.GetString("kImagesDefaultApp");

            if (string.IsNullOrEmpty(imageAppPath) || !File.Exists(imageAppPath))
            {
                System.Diagnostics.Process.Start(fullPath);
                return;
            }

            System.Diagnostics.Process.Start(imageAppPath, fullPath);
        }
//----------------------------------------------------------------------------------------------------------------------

        internal static void LockAndEditPlayableFrame(SISPlayableFrame playableFrame,
                                                      RenderCachePlayableAsset renderCachePlayableAsset)
        {
            int    index    = playableFrame.GetIndex();
            string filePath = renderCachePlayableAsset.GetImageFilePath(index);

            if (string.IsNullOrEmpty(filePath) || !File.Exists(filePath))
            {
                EditorUtility.DisplayDialog(StreamingImageSequenceConstants.DIALOG_HEADER,
                                            "Please update RenderCachePlayableAsset.",
                                            "Ok");
                return;
            }

            playableFrame.SetLocked(true);
            LaunchImageApplicationExternalTool(Path.GetFullPath(filePath));
        }
Exemple #3
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;
            }
            }
        }
Exemple #4
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;
            }
            }
        }