internal void FixGhInput(Param_ScriptVariable i, bool alsoSetIfNecessary = true) { i.Name = i.NickName; i.AllowTreeAccess = true; i.Optional = true; i.ShowHints = true; i.Hints = TypeHints.GetHints(); if (string.IsNullOrEmpty(i.Description)) { i.Description = string.Format("Script variable {0}", i.NickName); } if (alsoSetIfNecessary && i.TypeHint == null) { i.TypeHint = i.Hints[1]; } }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) { pManager.AddParameter(new Param_ScriptVariable { Name = "Input", NickName = "I", Description = "", AllowTreeAccess = true, Optional = true, ShowHints = true, Hints = TypeHints.GetHints(), }); pManager.AddParameter(new Param_ScriptVariable { Name = "Default", NickName = "D", Optional = true, Description = "" }); Params.Input[0].ObjectChanged += OnChange; }