示例#1
0
        private static void ObsManager_SceneChanged(object sender, string sceneName)
        {
            DateTime startTime = DateTime.Now;

            StopExistingAnimation();

            List <VideoAnimationBinding> bindings = AllVideoBindings.GetAll(sceneName);

            if (bindings != null)
            {
                StartLiveAnimation(sceneName, bindings, startTime);
            }

            if (sceneName == STR_AnimationEditor)
            {
                animationEditorTimer.Start();
            }
            else
            {
                HubtasticBaseStation.PreloadImageBack(null, 0, 0, 0);
                HubtasticBaseStation.PreloadImageFront(null, 0, 0, 0);
                HubtasticBaseStation.ShowImageFront(null);
                HubtasticBaseStation.ShowImageBack(null);
            }

            ChangeLightsBasedOnScene(sceneName);
        }
示例#2
0
        private void btnReloadAnimation_Click(object sender, RoutedEventArgs e)
        {
            List <VideoAnimationBinding> allBindings = AllVideoBindings.GetAll(SelectedSceneName);

            LoadAllFrames(allBindings);
            DrawActiveFrame();
        }
示例#3
0
        void LoadAnimation()
        {
            spSourceRadioButtons.Children.Clear();
            ActiveMovementFileName = null;
            List <VideoAnimationBinding> allBindings = AllVideoBindings.GetAll(SelectedSceneName);

            if (allBindings.Count == 0)
            {
                return;
            }
            CreateRadioButtons(allBindings);

            LoadAllFrames(allBindings);
            // TODO: Abort load if path not found.
            LoadAllImages(System.IO.Path.Combine(STR_EditorPath, SelectedSceneName));

            relativePathFront = GetRelativePathBaseName(frontFiles[frameIndex]);
            relativePathBack  = GetRelativePathBaseName(backFiles[frameIndex]);
            if (digitCount == 0)
            {
                int lastIndex = backFiles.Length - 1;
                digitCount = lastIndex.ToString().Length;
            }
            sldFrameIndex.Maximum = backFiles.Length - 1;
            UpdateUI();
            frameIndex = 0;
            DrawActiveFrame();
            ClearEditorValues();
            UpdateFrameUI();
        }
示例#4
0
        private LiveFeedAnimator GetLiveFeedAnimator(string movementFileName)
        {
            VideoAnimationBinding binding = AllVideoBindings.Get(movementFileName);
            string fullPathToMovementFile = VideoAnimationManager.GetFullPathToMovementFile(movementFileName);

            VideoFeed[] videoFeeds = AllVideoFeeds.GetAll(binding);
            return(VideoAnimationManager.LoadLiveAnimation(fullPathToMovementFile, binding, videoFeeds));
        }