public override bool Read(GH_IReader reader) { try { var constructorName = reader.GetString("SelectedConstructorName"); var typeName = reader.GetString("SelectedTypeName"); try { UseSchemaTag = reader.GetBoolean("UseSchemaTag"); UserSetSchemaTag = reader.GetBoolean("UserSetSchemaTag"); } catch { } SelectedConstructor = CSOUtils.FindConstructor(constructorName, typeName); if (SelectedConstructor == null) readFailed = true; } catch { readFailed = true; } try { Seed = reader.GetString("seed"); } catch { } return base.Read(reader); }
public override bool Read(GH_IReader reader) { Flag = reader.GetBoolean("PlyFromWidth1"); Flag2 = reader.GetBoolean("PlyFromWidth2"); Flag3 = reader.GetBoolean("PlyFromWidth3"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { Abs1 = reader.GetBoolean("Abs1"); Abs2 = reader.GetBoolean("Abs2"); Abs3 = reader.GetBoolean("Abs3"); return(base.Read(reader)); }
/// <summary> /// Read our own fields. Needed for (de)serialization of the variable input parameters. /// </summary> /// <param name="reader"> Provides access to a subset of GH_Chunk methods used for reading archives. </param> /// <returns> True on success, false on failure. </returns> public override bool Read(GH_IReader reader) { OverrideRobotTool = reader.GetBoolean("Override Robot Tool"); OverrideWorkObject = reader.GetBoolean("Override Work Object"); SetDigitalOutput = reader.GetBoolean("Set Digital Output"); return(base.Read(reader)); }
/// <summary> /// Read our own fields. Needed for (de)serialization of the variable input parameters. /// </summary> /// <param name="reader"> Provides access to a subset of GH_Chunk methods used for reading archives. </param> /// <returns> True on success, false on failure. </returns> public override bool Read(GH_IReader reader) { SetMass = reader.GetBoolean("Set Mass"); SetCenterOfGravity = reader.GetBoolean("Set Center of Gravity"); SetMomentOfInertia = reader.GetBoolean("Set Moment of Inertia"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { IntList = reader.GetBoolean("IntList"); BoolList = reader.GetBoolean("BoolList"); IntervalList = reader.GetBoolean("IntervalList"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { Strict = reader.GetBoolean("StrictChoice"); Some = reader.GetBoolean("SomeChoice"); All = reader.GetBoolean("AllChoice"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { _VectorX = reader.GetBoolean("_VectorX"); _VectorY = reader.GetBoolean("_VectorY"); _VectorZ = reader.GetBoolean("_VectorZ"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { outputDynamicFrames = reader.GetBoolean("outputDynamicFrames"); visualizeMouseManipulation = reader.GetBoolean("visualizeMouseManipulation"); asynchronous = reader.GetBoolean("asynchronous"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { isInstruction = reader.GetBoolean("isInstruction"); colorize = reader.GetBoolean("colorize"); angleApproach = reader.GetBoolean("angleApproach"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { UseDefaultCache = reader.GetBoolean("UseDefaultCache"); AutoSend = reader.GetBoolean("AutoSend"); CurrentComponentState = reader.GetString("CurrentComponentState"); BaseId = reader.GetString("BaseId"); var wrappersRaw = reader.GetString("OutputWrappers"); var wrapperLines = wrappersRaw.Split('\n'); if (wrapperLines != null && wrapperLines.Length != 0 && wrappersRaw != "") { foreach (var line in wrapperLines) { var pieces = line.Split('\t'); OutputWrappers.Add(new StreamWrapper { ServerUrl = pieces[0], StreamId = pieces[1], CommitId = pieces[2] }); } if (OutputWrappers.Count != 0) { JustPastedIn = true; } } return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { boolDirection = reader.GetBoolean("Horizontal"); boolLabel = reader.GetBoolean("Label"); boolTick = reader.GetBoolean("Tick"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { HasGrid = reader.GetBoolean("Grid"); HasAxis = reader.GetBoolean("Axis"); HasGizmo = reader.GetBoolean("Gizmo"); this.ExpireSolution(true); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { IsHorizontal = reader.GetBoolean("Horizontal"); IsFill = reader.GetBoolean("Extents"); this.UpdateMessage(); this.ExpireSolution(true); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { this.RemoveDupTris = reader.GetBoolean("Dup"); this.RemoveFinTris = reader.GetBoolean("Fin"); this.RemoveOcclTris = reader.GetBoolean("Occ"); this.RemoveUnusedVerts = reader.GetBoolean("Un"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { AlternateGraphics = reader.GetBoolean("alternateGraphics"); Sortable = reader.GetBoolean("Sortable"); ResizeHorizontal = reader.GetBoolean("ResizeHorizontal"); AddlRows = reader.GetBoolean("AddlRows"); GridType = reader.GetInt32("GridType"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { hJustify = reader.GetInt32("Vertical"); vJustify = reader.GetInt32("Horizontal"); IsBold = reader.GetBoolean("Bold"); IsItalic = reader.GetBoolean("Italic"); IsUnder = reader.GetBoolean("Under"); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { IconMode = reader.GetInt32("FontMode"); IsHorizontal = reader.GetBoolean("Horizontal"); IsLight = reader.GetBoolean("Light"); this.UpdateMessage(); return(base.Read(reader)); }
/// <summary> /// Adds to the default deserialization method to retrieve the saved child status so it persists on copy/paste and save/reopen. /// </summary> public override bool Read(GH_IReader reader) { mIndex = reader.GetInt32("mIndex"); iIndex = reader.GetInt32("iIndex"); fIndex = reader.GetInt32("fIndex"); pA = reader.GetBoolean("PerturbA"); pB = reader.GetBoolean("PerturbB"); UpdateMessage(); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { modeStatus = reader.GetInt32("FilterMode"); modeTitle = reader.GetBoolean("Title"); modeCtrl = reader.GetBoolean("Ctrl"); modeScrollH = reader.GetBoolean("ScrollH"); modeScrollV = reader.GetBoolean("ScrollV"); modeTrans = reader.GetBoolean("Transparent"); this.UpdateMessage(); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { if (reader.ItemExists("ignoreAllWarningMsg")) { this._ignoreAllWarningMsg = reader.GetBoolean("ignoreAllWarningMsg"); } if (reader.ItemExists(this._remoteFlyName)) { this._remoteFly = reader.GetBoolean(this._remoteFlyName); } return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { OrientMode = reader.GetInt32("Orientation"); IsHorizontal = reader.GetBoolean("Horizontal"); IsExtents = reader.GetBoolean("Extents"); HasTicks = reader.GetBoolean("Ticks"); IsLight = reader.GetBoolean("Light"); IsFlipped = reader.GetBoolean("Flipped"); this.UpdateMessage(); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { UseDefaultCache = reader.GetBoolean("UseDefaultCache"); AutoSend = reader.GetBoolean("AutoSend"); CurrentComponentState = reader.GetString("CurrentComponentState"); BaseId = reader.GetString("BaseId"); var wrappersRaw = reader.GetString("OutputWrappers"); var wrapperLines = wrappersRaw.Split('\n'); if (wrapperLines != null && wrapperLines.Length != 0 && wrappersRaw != "") { foreach (var line in wrapperLines) { var pieces = line.Split('\t'); OutputWrappers.Add(new StreamWrapper { ServerUrl = pieces[0], StreamId = pieces[1], CommitId = pieces[2] }); } if (OutputWrappers.Count != 0) { JustPastedIn = true; } } var kitName = ""; reader.TryGetString("KitName", ref kitName); if (kitName != "") { try { SetConverterFromKit(kitName); } catch (Exception e) { AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, $"Could not find the {kitName} kit on this machine. Do you have it installed? \n Will fallback to the default one."); SetDefaultKitAndConverter(); } } else { SetDefaultKitAndConverter(); } return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { BoolCycle = reader.GetBoolean("Cycle"); this.UpdateMessage(); return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { GH_IReader gH_IReader = reader.FindChunk("Checkbox", Index); _active = gH_IReader.GetBoolean("Active"); return(true); }
/// <summary> /// Adds to the default deserialization method to retrieve the saved child status so it persists on copy/paste and save/reopen. /// </summary> public override bool Read(GH_IReader reader) { unitize = reader.GetBoolean("Unitize"); UpdateMessage(); return(base.Read(reader)); }
public static GH_Structure <IGH_Goo> DeserializeGrasshopperData(byte[] array) { GH_LooseChunk val = new GH_LooseChunk("Noah Data"); val.Deserialize_Binary(array); if (val.ItemCount == 0) { return(null); } GH_Structure <IGH_Goo> gH_Structure = new GH_Structure <IGH_Goo>(); GH_IReader val2 = val.FindChunk("Block", 0); bool boolean = val2.GetBoolean("Empty"); if (boolean) { return(null); } GH_IReader val3 = val2.FindChunk("Data"); if (val3 == null) { return(null); } else if (!gH_Structure.Read(val3)) { return(null); } return(gH_Structure); }
public override bool Read(GH_IReader reader) { FilterMode = reader.GetInt32("FilterMode"); OptimizeCurve = reader.GetBoolean("Optimize"); return(base.Read(reader)); }
/// <summary> /// Makes sure we deserialise correctly, and reinstate everything there is to reinstate: /// - type properties /// - optional properties /// </summary> /// <param name="reader"></param> /// <returns></returns> public override bool Read(GH_IReader reader) { bool isInit = reader.GetBoolean("init"); if (isInit) { var selectedTypeName = reader.GetString("type"); var selectedTypeAssembly = reader.GetString("assembly"); var myOptionalProps = SpeckleCore.Converter.getObjFromBytes(reader.GetByteArray("optionalmask")) as Dictionary <string, bool>; var selectedType = SpeckleCore.SpeckleInitializer.GetTypes().FirstOrDefault(t => t.Name == selectedTypeName && t.AssemblyQualifiedName == selectedTypeAssembly); if (selectedType != null) { SwitchToType(selectedType); OptionalPropsMask = myOptionalProps; var optionalProps = typeof(SpeckleCore.SpeckleObject).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(pinfo => pinfo.Name != "Type"); foreach (var kvp in OptionalPropsMask) { if (kvp.Value) { RegisterPropertyAsInputParameter(optionalProps.First(p => p.Name == kvp.Key), Params.Input.Count); } } } else { AddRuntimeMessage(GH_RuntimeMessageLevel.Error, string.Format("Type {0} from the {1} kit was not found. Are you sure you have it installed?", selectedTypeName, selectedTypeAssembly)); } } return(base.Read(reader)); }
public override bool Read(GH_IReader reader) { GH_IReader val = reader.FindChunk("RadioButton", Index); _active = val.GetBoolean("Active"); return(true); }
public override bool Read(GH_IReader reader) { isCartesian = reader.GetBoolean("IsCartesian"); return base.Read(reader); }