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); }
private void btnReloadAnimation_Click(object sender, RoutedEventArgs e) { List <VideoAnimationBinding> allBindings = AllVideoBindings.GetAll(SelectedSceneName); LoadAllFrames(allBindings); DrawActiveFrame(); }
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(); }
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)); }