private void menuChangeMode(object sender, EventArgs e)
        {
            var dataIn = sender.ToString();

            if (Params.Input.Count > 1)
            {
                GH_ComponentParamServer.IGH_SyncObject so = Params.EmitSyncObject();
                List <IGH_Param> pars = new List <IGH_Param>();
                pars.AddRange(Params.Input);
                foreach (IGH_Param pi in pars)
                {
                    if (pi.NickName == "points")
                    {
                        continue;
                    }
                    pi.IsolateObject();
                    Params.UnregisterInputParameter(pi);
                }
            }

            eSupportType tempSupType = eSupportType.FIXED;

            switch (dataIn)
            {
            case "AllFixed":
                tempSupType = eSupportType.FIXED;
                break;

            case "AllPinned":
                tempSupType = eSupportType.PINNED;
                break;

            case "ByConstraints":
                NewBooleanParam("x", "x", "", GH_ParamAccess.item, true);
                NewBooleanParam("y", "y", "", GH_ParamAccess.item, true);
                NewBooleanParam("z", "z", "", GH_ParamAccess.item, true);
                NewBooleanParam("rx", "rx", "", GH_ParamAccess.item, true);
                NewBooleanParam("ry", "ry", "", GH_ParamAccess.item, true);
                NewBooleanParam("rz", "rz", "", GH_ParamAccess.item, true);
                tempSupType = eSupportType.CUSTOM;
                break;
            }

            SetSupportType(tempSupType);
        }
コード例 #2
0
 // eSupportType
 internal static CSiProgram.eObjType ToCSi(eSupportType enumValue)
 {
     return((CSiProgram.eObjType)enumValue);
 }
 public void SetSupportType(eSupportType stype)
 {
     supType = stype;
     this.ExpireSolution(true);
 }