public override bool Read(GH_IO.Serialization.GH_IReader reader) { m_value = 0; reader.TryGetInt32("Bitmask3", ref m_value); if (!reader.TryGetInt32("NumBits", ref NumBits)) { NumBits = 3; } (m_attributes as BitMask3ObjectAttributes).SetBits(NumBits); (m_attributes as BitMask3ObjectAttributes).SetBitmask(m_value); return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { int f = 1; reader.TryGetInt32("subdivide", ref f); _subdv = (subdivide)f; return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { int mt = (int)eCombinationType.LinearAdditive; reader.TryGetInt32("ComType", ref mt); SetMaterial((eCombinationType)mt); return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { int ty = (int)eFixityType.FULLY_FIXED; reader.TryGetInt32("FixType", ref ty); SetFixType((eFixityType)ty); return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { m_value = 0; reader.TryGetInt32("Bitmask3", ref m_value); BitMask3ObjectAttributes attr = m_attributes as BitMask3ObjectAttributes; attr.SetBitmask(m_value); return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { int ty = 0; reader.TryGetInt32("ShapeType", ref ty); type = ty; return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { int ty = (int)eSupportType.FIXED; reader.TryGetInt32("SupType", ref ty); SetSupportType((eSupportType)ty); return(base.Read(reader)); }
/// <summary> /// Read all required data for deserialization from an IO archive. /// </summary> /// <param name="reader">Object to read with.</param> /// <returns> /// True on success, false on failure. /// </returns> public override bool Read(GH_IO.Serialization.GH_IReader reader) { int clickVal = -1; if (reader.TryGetInt32("ClickMode", ref clickVal)) { clickMode = (ClickableShapeGrid.ClickMode)clickVal; } UpdateMessage(); return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { int mt = (int)eColorMode.Stress_Combined_Absolute; reader.TryGetInt32("cType", ref mt); //CrossSectionType = (CROSSSECTIONS)cs; SetColorMode((eColorMode)mt); return(base.Read(reader)); }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { int val = -1; if (reader.TryGetInt32(TargetDocIdentifier, ref val)) { DocStorageMode = (DocStorage)val; } if (!Enum.IsDefined(typeof(DocStorage), DocStorageMode)) { DocStorageMode = DocStorage.InGrasshopperMemory; } return(base.Read(reader)); }
/*************************************/ public override bool Read(GH_IO.Serialization.GH_IReader reader) { if (!base.Read(reader)) { return(false); } string callerString = ""; reader.TryGetString("Component", ref callerString); if (Caller.Read(callerString)) { int selection = -1; reader.TryGetInt32("Selection", ref selection); if (selection >= 0 && selection < ListItems.Count) { //To acount for changes in orders of enums and dataset, match name of previous item with name of new items instead of //simply relying on previous index. //Get name of selected item string prevName = ListItems[selection].Name; //Find index in list of new items with matching name to selected name int index = Caller.GetChoiceNames().IndexOf(prevName); //Make sure component is up to date with backend caller UpdateFromSelectedItem(); //If index is found, update to this. If item is not found, use previous selection. if (index != -1) { selection = index; } //As item count might have been reduced in UpdateFromSelected, a final check that the selection is not out of bounds needed. if (selection < ListItems.Count) { this.SelectItem(selection); } } return(true); } else { return(false); } }
public override bool Read(GH_IO.Serialization.GH_IReader reader) { m_value = 0; reader.TryGetInt32("SpecialInteger", ref m_value); return(base.Read(reader)); }