public void HandlePropagatePressed() { if (string.IsNullOrEmpty(LoadedPackagePath)) { return; } var request = new ChainView.PackageRequest(LoadedPackagePath, this); ChainView.PropagateGroup(request); }
public void RefreshDirtyState() { if (ChainView.Instance.IsBusy) { return; } if (TimelineViewBehaviour.Instance == null) { return; } if (TimelineViewBehaviour.Instance.Timeline.IsBusy) { return; } if (HaxxisGlobalSettings.Instance.IsVgsJob == true) { return; } if (HaxxisGlobalSettings.Instance.DisableEditor == true) { return; } if (string.IsNullOrEmpty(LoadedPackagePath)) { var hasChildren = GroupViews.Any() || NodeViews.Any(); DirtyIndicatorComponent.gameObject.SetActive(hasChildren); return; } try { ChainGroup.SerializingGroup = Group; var hp = ChainView.GetHaxxisPackageForGroupView(this); var hasChanged = HaxxisPackage.IsChanged(hp, LoadedPackagePath); DirtyIndicatorComponent.gameObject.SetActive(hasChanged); } finally { ChainGroup.SerializingGroup = null; } }
private void HandleDraggableDragMoved() { if (ChainView.Instance.Zooming) { return; } BoundsChanged(); if (IsRecursiveDrag) { foreach (var nodeView in ChainView.GetDescendentNodeViews(this)) { nodeView.BoundsChanged(); } } }
private void StartNextFileValidation( ) { var filename = Packages[CurrentFileIndex].Filename; CurrentFileName = "\"" + filename + "\""; if (SaveFileUpdateOption.IsPresent) { Debug.Log("Starting save file update process on " + CurrentFileName); } else { Debug.Log("Starting validation of " + CurrentFileName); } TotalPackagesAttempted++; Stage = ValidationStage.Load; ErrorInLastStage = false; ChainView.LoadPackage(new ChainView.PackageRequest(filename, null)); }
private void HandleDraggableDragEnded() { if (ChainView.Instance.Zooming || ChainView.Instance.Dragging) { return; } JustMoved = true; BoundsChanged(); m_rect = new Rect(transform.position.x - 80, transform.position.y - knownLargestHeight - 80, RectTransform.rect.width + 160, knownLargestHeight + 160); if (IsRecursiveDrag) { foreach (var nodeView in ChainView.GetDescendentNodeViews(this)) { nodeView.BoundsChanged(); } } }
private void HandleDraggableMouseDown() { if (ChainView.Instance.Zooming) { return; } IsRecursiveDrag = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift); if (IsRecursiveDrag) { var nodeViewsToDrag = ChainView.GetDescendentNodeViews(this); nodeViewsToDrag.Add(this); Draggable.Targets = nodeViewsToDrag.Select(d => d.transform).ToList(); } else { Draggable.Targets = new List <Transform> { transform }; } }
private void HandleIsBusyChanged(bool isBusy) { if (Stage == ValidationStage.Choreography) // Doing this because choreography itself can [optionally] do an eval at the start of playback { return; } if (isBusy) { DevCommandManager.Instance.StartWait(); return; } if (!DoingJustCurrentHPValidation || Stage != ValidationStage.Load) { DevCommandManager.Instance.EndWait(); } var readyForNextFile = false; switch (Stage) { case ValidationStage.Load: if (ErrorInLastStage) { Debug.Log("Validation: Error occurred in LOAD of " + CurrentFileName); readyForNextFile = true; Packages[CurrentFileIndex].Result = ResultCode.FailedLoad; } else { TotalSuccessfulLoads++; if (!DoingJustCurrentHPValidation) { Debug.Log("Successful LOAD of " + CurrentFileName); } if (SaveFileUpdateOption.IsPresent) { Stage = ValidationStage.Save; ErrorInLastStage = false; ChainView.SavePackage(new ChainView.PackageRequest(ChainView.LoadedPackagePath, null)); break; } if (ChainView.Chain.HasError) { if (DoingJustCurrentHPValidation) { Debug.Log("Validation: The current package has chain errors and thus cannot be evaluated"); } else { Debug.Log("Validation: The package " + CurrentFileName + " has chain errors and thus cannot be evaluated"); if (!DoingJustCurrentHPValidation) { Packages[CurrentFileIndex].Result = ResultCode.HasChainErrors; } } readyForNextFile = true; } else { TotalSuccessfulChains++; Debug.Log("No errors found in node chain for " + CurrentFileName); ErrorInLastStage = false; if (LoadOnlyOption.IsPresent) { ReadyForNextFile(); } else { Stage = ValidationStage.Eval; ChainView.EvaluateChain(); } } } break; case ValidationStage.Eval: if (ErrorInLastStage) { Debug.Log("Validation: Error occurred during EVALUATION of " + CurrentFileName); readyForNextFile = true; if (!DoingJustCurrentHPValidation) { Packages[CurrentFileIndex].Result = ResultCode.FailedEval; } } else { TotalSuccessfulEvals++; Debug.Log("Successful EVALUATION of " + CurrentFileName); ErrorInLastStage = false; if (IncludeChoreographyOption.IsPresent) { Stage = ValidationStage.Choreography; TimelineView.Play(); } else { ReadyForNextFile(); } } break; case ValidationStage.Choreography: // This stage is handled in HandleTimelineViewPlayStopped break; case ValidationStage.Save: readyForNextFile = true; if (ErrorInLastStage) { Debug.Log("Validation: Error occurred in SAVE of " + CurrentFileName); Packages[CurrentFileIndex].Result = ResultCode.FailedSave; } else { Debug.Log("Successful SAVE of " + CurrentFileName); TotalSuccessfulSaves++; } break; } if (readyForNextFile) { ReadyForNextFile(); } }