Ejemplo n.º 1
0
        public void FixGhInput()
        {
            NickName = cleanNickname(NickName);
            NickName = NickName.Replace("_" + Decodes_PythonComponent.attributes_suffix, "_baduser");
            if (String.Compare(NickName, "code", StringComparison.InvariantCultureIgnoreCase) == 0)
            {
                NickName = "baduser";
            }

            Name = NickName; // set name to nickname, omitting array brackets (added below)

            if (Access == GH_ParamAccess.list)
            {
                NickName = "[" + NickName + "]";
            }

            if (string.IsNullOrEmpty(Description))
            {
                Description = string.Format("Script variable {0}", Name);
            }
            Optional  = true;
            ShowHints = true;

            Hints = Decodes_PythonComponent.GetHints();
            if (TypeHint == null)
            {
                TypeHint = Hints[0];
            }
        }