コード例 #1
0
        internal override void FixGhInput(Param_ScriptVariable param, bool alsoSetIfNecessary = true)
        {
            param.NickName = Decodes_PythonComponent.cleanNickname(param.NickName);
            param.NickName = param.NickName.Replace("_" + Decodes_PythonComponent.attributes_suffix, "_baduser");
            if (String.Compare(param.NickName, "code", StringComparison.InvariantCultureIgnoreCase) == 0)
            {
                param.NickName = "baduser";
            }

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

            //if (param.Access == GH_ParamAccess.list) NickName = "[" + NickName + "]";

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

            param.Hints = Decodes_PythonComponent.GetHints();
            if (param.TypeHint == null)
            {
                param.TypeHint = param.Hints[0];
            }
        }
コード例 #2
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];
            }
        }
コード例 #3
0
 private void RemoveParamMarkers()
 {
     foreach (IGH_Param param in Owner.Params.Input)
     {
         param.NickName = Decodes_PythonComponent.cleanNickname(param.NickName);
     }
     foreach (IGH_Param param in Owner.Params.Output)
     {
         param.NickName = Decodes_PythonComponent.cleanNickname(param.NickName);
     }
 }
コード例 #4
0
 public Decodes_PythonComponent_Attributes(Decodes_PythonComponent owner) : base(owner)
 {
 }