public void OnImportsSatisfied() { var particleSystemRegistry = ParticleSystemRegistry.Instance; particleSystemRegistry.Changed += HandleRegistryChange; this.ParticleSystemNodeId = PluginHost.GetNodePath(false); }
//called when data for any output pin is requested public void Evaluate(int SpreadMax) { PluginHost.GetHostPath(out var hostpath); PluginHost.GetNodePath(false, out var nodepath); FHost[0] = hostpath; FNode[0] = nodepath; //FLogger.Log(LogType.Debug, "hi tty!"); }
public void OnImportsSatisfied() { NodePath = "CustomEnum_" + FHost.GetNodePath(false); EnumSample = FIoFactory.CreatePin <EnumEntry>(new InputAttribute("Enum Sample") { EnumName = NodePath }); UpdateEnumAndPins(); }
Dictionary <string, IIOContainer> FPins = new Dictionary <string, IIOContainer>(); //dynamic pins #endregion variables #region constructor and init public void OnImportsSatisfied() { TransitionNames.Changed += HandleTransitionPins; //dynamic enum attributes with unique name FHost.GetNodePath(true, out EnumName); //get unique node path EnumName += "AutomataUI"; // add unique name to path attr = new InputAttribute("Default State"); //name of pin attr.EnumName = EnumName; attr.DefaultEnumEntry = "Init"; //default state attr.Visibility = PinVisibility.OnlyInspector; //make invisible DefaultState = FIOFactory.CreateDiffSpread <EnumEntry>(attr); }
protected virtual void OnSelectFormular(IDiffSpread <EnumEntry> spread) { if (FFormularSelection.IsAnyInvalid() || string.IsNullOrWhiteSpace(FFormularSelection[0].Name)) { FLogger.Log(LogType.Warning, "[\"" + this.GetType().Name + "\"] - Select a Formular. ID = " + PluginHost.GetNodePath(false)); return; } var formularName = FFormularSelection[0].Name; if (Formular.Name == formularName) { return; } if (formularName != MessageFormular.DYNAMIC) { Formular = RetrieveAdoptedFormular(formularName); } else { // fallback to what's been known to the node // so a switch to DYNAMIC keeps the old entries (but makes them editable) Formular.Name = MessageFormular.DYNAMIC; Formular = Formular; } }
protected virtual void OnSelectFormular(IDiffSpread <EnumEntry> spread) { if (FFormularSelection.IsAnyInvalid() || string.IsNullOrWhiteSpace(FFormularSelection[0].Name)) { FLogger.Log(LogType.Warning, "[\"" + this.GetType().Name + "\"] - Select a Formular. ID = " + PluginHost.GetNodePath(false)); return; } var formularName = FFormularSelection[0].Name; if (Formular.Name == formularName) { return; } var backup = new MessageFormular(formularName, FConfig[0]); // local backup try { MessageFormular formular; if (formularName != MessageFormular.DYNAMIC) { formular = RetrieveFormular(formularName); formular.Require(RequireEnum.NoneBut, backup); } else { formular = backup; // fallback to what's been known to the node formular.Name = formularName; } Formular = formular; } catch (RegistryException) { // i.e. not found. might happen during first frame Formular = backup; } }