public override void Deserialize(MoDeserializer archive) { IsRepeating = archive.ReadByte() == 1; IsStayingAtStoppedFrame = archive.ReadByte() == 1; IsStartingFromCurrentFrame = archive.ReadByte() == 1; StartFrameIndex = archive.ReadInt32(); EndFrameIndex = archive.ReadInt32(); }
public override void Deserialize(MoDeserializer archive) { Position = archive.Deserialize <Vector3Wrapper>().Value; Quaternion = archive.Deserialize <QuaternionWrapper>().Value; IsSaved = archive.ReadByte() == 0; IsPhysicsEnabled = archive.ReadByte() == 0; IsRowSelected = archive.ReadByte() == 1; }
internal override void DeserializeKeyFrame(MoDeserializer archive) { Value = new BoneState(); Value.Interpolation = archive.Deserialize <BoneInterpolationImpl>(); Value.Position = archive.Deserialize <Vector3Wrapper>().Value; Value.Quaternion = archive.Deserialize <QuaternionWrapper>().Value; IsSelected = archive.ReadByte() == 1; Value.IsPhysicsEnabled = archive.ReadByte() == 0; }
public override void Deserialize(MoDeserializer archive) { byte data = archive.ReadByte(); IsVisible = (data & 1) == 1; Opacity = (float)((100 - (data >> 1)) / 100.0); ExternalParent = new BoneReference(archive.ReadInt32(), archive.ReadInt32()); Position = archive.Deserialize <Vector3Wrapper>().Value; Rotation = archive.Deserialize <Vector3Wrapper>().Value; Scale = archive.ReadSingle(); IsShadowEnabled = archive.ReadByte() == 1; }
public override void Deserialize(MoDeserializer archive) { Index = archive.ReadByte(); Name = archive.ReadVariableString(); NameEn = archive.ReadVariableString(); Path = archive.ReadByteString(256).TrimNull(); TimelinePanelRowsCount = archive.ReadByte(); BoneNames = archive.DeserializeList(archive.ReadInt32(), () => archive.ReadVariableString()); MorphNames = archive.DeserializeList(archive.ReadInt32(), () => archive.ReadVariableString()); IKBoneIndices = archive.DeserializeList(archive.ReadInt32(), () => archive.ReadInt32()); ExternalParentBoneIndices = archive.DeserializeList(archive.ReadInt32(), () => archive.ReadInt32()); RenderingOrder = archive.ReadByte(); IsVisible = archive.ReadByte() == 1; SelectedBoneIndex = archive.ReadInt32(); MorphPanel = archive.Deserialize <MorphSelection>(); BoneGroupsExpansion = archive.DeserializeList((int)archive.ReadByte(), () => archive.ReadByte() == 1); TimelinePanelTopRowIndex = archive.ReadInt32(); LastFrameIndex = archive.ReadInt32(); InitialBoneKeyFrames = archive.DeserializeList(BonesCount, () => archive.Deserialize(new BoneKeyFrame() { IsInitialKeyFrame = true })); BoneKeyFrames = archive.DeserializeList <BoneKeyFrame>(archive.ReadInt32()); InitialMorphKeyFrames = archive.DeserializeList(MorphsCount, () => archive.Deserialize(new MorphKeyFrame() { IsInitialKeyFrame = true })); MorphKeyFrames = archive.DeserializeList <MorphKeyFrame>(archive.ReadInt32()); InitialModelKeyFrame = archive.Deserialize(new ModelKeyFrame() { IsInitialKeyFrame = true, IKBonesCount = IKBonesCount, ExternalParentBonesCount = ExternalParentBonesCount }); ModelKeyFrames = archive.DeserializeList(archive.ReadInt32(), () => archive.Deserialize(new ModelKeyFrame() { IKBonesCount = IKBonesCount, ExternalParentBonesCount = ExternalParentBonesCount }) ); CurrentBoneStatuses = archive.DeserializeList <CurrentBoneState>(BonesCount); CurrentMorphStatuses = archive.DeserializeList <MorphState>(MorphsCount); IKBonesEnabled = archive.DeserializeList(IKBonesCount, () => archive.ReadByte() == 1); ExternalParentStatuses = archive.DeserializeList <ExternalParentState>(ExternalParentBonesCount); IsAdditiveBlending = archive.ReadByte() == 1; EdgeWidth = archive.ReadSingle(); IsSelfShadowEnabled = archive.ReadByte() == 1; CalculationOrder = archive.ReadByte(); }
public override void Deserialize(MoDeserializer archive) { X = new Interpolation(new InterpolationParameter(archive.ReadByte(), archive.ReadByte()), new InterpolationParameter(archive.ReadByte(), archive.ReadByte())); Y = new Interpolation(new InterpolationParameter(archive.ReadByte(), archive.ReadByte()), new InterpolationParameter(archive.ReadByte(), archive.ReadByte())); Z = new Interpolation(new InterpolationParameter(archive.ReadByte(), archive.ReadByte()), new InterpolationParameter(archive.ReadByte(), archive.ReadByte())); R = new Interpolation(new InterpolationParameter(archive.ReadByte(), archive.ReadByte()), new InterpolationParameter(archive.ReadByte(), archive.ReadByte())); }
public override void Deserialize(MoDeserializer archive) { Index = archive.ReadByte(); Name = archive.ReadByteString(100).TrimNull(); Path = archive.ReadByteString(256).TrimNull(); RenderingOrder = archive.ReadByte(); InitialKeyFrame = archive.Deserialize(new AccessoryKeyFrame() { IsInitialKeyFrame = true }); KeyFrames = archive.DeserializeList <AccessoryKeyFrame>(archive.ReadInt32()); CurrentStatus = archive.Deserialize <AccessoryState>(); IsAdditiveBlending = archive.ReadByte() == 1; }
public override void Deserialize(MoDeserializer archive) { Position = archive.Deserialize <PointWrapper>().Value; Scale = archive.ReadSingle(); Path = archive.ReadByteString(256).TrimNull(); IsVisible = archive.ReadByte() == 1; }
public override void Deserialize(MoDeserializer archive) { CenterPosition = archive.Deserialize <Vector3Wrapper>().Value; OffsetPosition = archive.Deserialize <Vector3Wrapper>().Value; Rotation = archive.Deserialize <Vector3Wrapper>().Value; IsPerspectiveEnabled = archive.ReadByte() == 0; }
public override void Deserialize(MoDeserializer archive) { Acceleration = archive.ReadSingle(); NoiseAmount = archive.ReadInt32(); Direction = archive.Deserialize <Vector3Wrapper>().Value; IsNoiseEnabled = archive.ReadByte() == 1; }
internal override void DeserializeKeyFrameValue(MoDeserializer archive) { Value = new GravityState() { IsNoiseEnabled = archive.ReadByte() == 1, NoiseAmount = archive.ReadInt32(), Acceleration = archive.ReadSingle(), Direction = archive.Deserialize <Vector3Wrapper>().Value }; }
public override void Deserialize(MoDeserializer archive) { IsEnabled = archive.ReadByte() == 1; CurrentStatus = archive.Deserialize <SelfShadowState>(); InitialKeyFrame = archive.Deserialize(new SelfShadowKeyFrame() { IsInitialKeyFrame = true }); KeyFrames = archive.DeserializeList <SelfShadowKeyFrame>(archive.ReadInt32()); }
internal override void DeserializeKeyFrameValue(MoDeserializer archive) { Distance = -archive.ReadSingle(); Value = new CameraState(); Value.CenterPosition = archive.Deserialize <Vector3Wrapper>().Value; var r = archive.Deserialize <Vector3Wrapper>().Value; Value.Rotation = new Vector3(-r.X, r.Y, r.Z); FollowingBone = new BoneReference(archive.ReadInt32(), archive.ReadInt32()); Interpolation = archive.Deserialize <CameraInterpolationImpl>(); Value.IsPerspectiveEnabled = archive.ReadByte() == 0; AngleOfView = archive.ReadInt32(); }
public override void Deserialize(MoDeserializer archive) { KeyFrameIndex = archive.ReadInt32(); Distance = -archive.ReadSingle(); var pos = archive.Deserialize <Vector3Wrapper>().Value; Position = new Vector3(pos.X, pos.Y, pos.Z); var r = archive.Deserialize <Vector3Wrapper>().Value; Rotation = new Vector3(-r.X, r.Y, r.Z); Interpolation = archive.Deserialize <CameraInterpolationImpl>(); AngleOfView = archive.ReadInt32(); IsPerspectiveEnabled = archive.ReadByte() == 0; }
public override void Deserialize(MoDeserializer archive) { Camera = archive.ReadByte() == 1; Light = archive.ReadByte() == 1; Accessory = archive.ReadByte() == 1; Bone = archive.ReadByte() == 1; Morph = archive.ReadByte() == 1; SelfShadow = archive.ReadByte() == 1; }
public override void Deserialize(MoDeserializer archive) { KeyFrameIndex = archive.ReadInt32(); Type = (SelfShadowType)archive.ReadByte(); Distance = (int)Math.Round(10000 - archive.ReadSingle() * 100000); }
public override void Deserialize(MoDeserializer archive) { IsVisible = archive.ReadByte() == 1; IKEnabled = archive.DeserializeList(IKBonesCount, () => archive.ReadByte() == 1); ExternalParentBoneStatuses = archive.DeserializeList(ExternalParentBonesCount, () => new BoneReference(archive.ReadInt32(), archive.ReadInt32())); }
public override void Deserialize(MoDeserializer archive) { if (archive.ReadByteString(30).TrimNull() != Signature) { throw new ArgumentException("Unsupported or invalid .pmm file"); } OutputSize = archive.Deserialize <SizeWrapper>().Value; TimelinePanelWidth = archive.ReadInt32(); AngleOfView = archive.ReadSingle(); IsModelSelected = archive.ReadByte() == 0; PanelExpansion = archive.Deserialize <PanelExpansion>(); SelectedModelIndex = archive.ReadByte(); Models = archive.DeserializeList <Model>((int)archive.ReadByte()); Camera = archive.Deserialize <Camera>(); Light = archive.Deserialize <Light>(); SelectedAccessoryIndex = archive.ReadByte(); TimelinePanelTopAccessoryIndex = archive.ReadInt32(); AccessoriesCount = archive.ReadByte(); for (int i = 0; i < AccessoriesCount; i++) { archive.ReadByteString(100); } Accessories = archive.DeserializeList <Accessory>(AccessoriesCount); TimelinePanelStatus = archive.Deserialize <TimelinePanelState>(); BoneSelectionType = (DomainModels.Components.BoneSelectionType)archive.ReadInt32(); CameraFollowingType = (DomainModels.Components.CameraFollowingType)archive.ReadByte(); PreviewPanel = archive.Deserialize <PreviewPanel>(); Media = archive.Deserialize <Media>(); IsInformationVisible = archive.ReadByte() == 1; IsAxesVisible = archive.ReadByte() == 1; IsSurfaceShadowEnabled = archive.ReadByte() == 1; FpsLimit = archive.ReadSingle(); ScreenCapturingMode = (DomainModels.Components.ScreenCaptureMode)archive.ReadInt32(); AccessoryRenderedAfterModelIndex = archive.ReadInt32(); SurfaceShadowBrightness = archive.ReadSingle(); IsSurfaceShadowTransparent = archive.ReadByte() == 1; PhysicsMode = (DomainModels.Components.PhysicsMode)archive.ReadByte(); Gravity = archive.Deserialize <Gravity>(); SelfShadow = archive.Deserialize <SelfShadow>(); EdgeColor = archive.Deserialize <Int32ColorWrapper>().Value; IsBackgroundBlack = archive.ReadByte() == 1; // huh? CameraFollowingBone = new BoneReference(archive.ReadInt32(), archive.ReadInt32()); // unknown 64bits sequence for (int i = 0; i < 64; i++) { archive.ReadByte(); } IsFollowingViewEnabled = archive.ReadByte() == 1; archive.ReadByte(); // unknown IsGroundPhysicsEnabled = archive.ReadByte() == 1; FrameJumpingBoxValue = archive.ReadInt32(); archive.ReadByte(); // after v9.24, this will be 1 that represents trailing section has valid data. RangeSelections = archive.DeserializeList <RangeSelection>(Models.Count); }
public override void Deserialize(MoDeserializer archive) { X = new Interpolation(); Y = new Interpolation(); Z = new Interpolation(); R = new Interpolation(); var x = new InterpolationParameter(); var y = new InterpolationParameter(); var z1 = new InterpolationParameter(); var r1 = new InterpolationParameter(); var z2 = new InterpolationParameter(); var r2 = new InterpolationParameter(); x.X = archive.ReadByte(); y.X = archive.ReadByte(); archive.ReadByte(); archive.ReadByte(); x.Y = archive.ReadByte(); y.Y = archive.ReadByte(); X.First = x; Y.First = y; z1.Y = archive.ReadByte(); r1.Y = archive.ReadByte(); x.X = archive.ReadByte(); y.X = archive.ReadByte(); z2.X = archive.ReadByte(); r2.X = archive.ReadByte(); x.Y = archive.ReadByte(); y.Y = archive.ReadByte(); z2.Y = archive.ReadByte(); r2.Y = archive.ReadByte(); archive.ReadByte(); z1.X = archive.ReadByte(); r1.X = archive.ReadByte(); X.Second = x; Y.Second = y; Z.First = z1; Z.Second = z2; R.First = r1; R.Second = r2; for (int i = 0; i < 64 - 19; i++) { archive.ReadByte(); } }
public override void Deserialize(MoDeserializer archive) { BoneName = archive.ReadByteString(20).TrimNull(); IsEnabled = archive.ReadByte() == 1; }
public override void Deserialize(MoDeserializer archive) { IsEnabled = archive.ReadByte() == 1; Path = archive.ReadByteString(256).TrimNull(); }
public override void Deserialize(MoDeserializer archive) { ModelIndex = archive.ReadByte(); SelectedIndex = archive.ReadInt32(); }
/// <summary> /// When overriden in a derived class, deserializes this key frame except its metadata by its own way. /// </summary> /// <param name="archive">The instance of <see cref="MoDeserializer"/> to deserialize</param> internal virtual void DeserializeKeyFrame(MoDeserializer archive) { DeserializeKeyFrameValue(archive); IsSelected = archive.ReadByte() == 1; }
public override void Deserialize(MoDeserializer archive) { X.First = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); X.Second = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); Y.First = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); Y.Second = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); Z.First = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); Z.Second = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); R.First = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); R.Second = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); D.First = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); D.Second = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); V.First = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); V.Second = new InterpolationParameter(archive.ReadByte(), archive.ReadByte()); }
public override void Deserialize(MoDeserializer archive) { KeyFrameIndex = archive.ReadInt32(); IsVisible = archive.ReadByte() == 1; IKData = archive.DeserializeList <IKBoneData>(); }
internal override void DeserializeKeyFrameValue(MoDeserializer archive) { SelfShadowType = (SelfShadowType)archive.ReadByte(); base.DeserializeKeyFrameValue(archive); }
public override void Deserialize(MoDeserializer archive) { var first = new InterpolationParameter(); var second = new InterpolationParameter(); first.X = archive.ReadByte(); second.X = archive.ReadByte(); first.Y = archive.ReadByte(); second.Y = archive.ReadByte(); X.First = first; X.Second = second; first.X = archive.ReadByte(); second.X = archive.ReadByte(); first.Y = archive.ReadByte(); second.Y = archive.ReadByte(); Y.First = first; Y.Second = second; first.X = archive.ReadByte(); second.X = archive.ReadByte(); first.Y = archive.ReadByte(); second.Y = archive.ReadByte(); Z.First = first; Z.Second = second; first.X = archive.ReadByte(); second.X = archive.ReadByte(); first.Y = archive.ReadByte(); second.Y = archive.ReadByte(); R.First = first; R.Second = second; first.X = archive.ReadByte(); second.X = archive.ReadByte(); first.Y = archive.ReadByte(); second.Y = archive.ReadByte(); D.First = first; D.Second = second; first.X = archive.ReadByte(); second.X = archive.ReadByte(); first.Y = archive.ReadByte(); second.Y = archive.ReadByte(); V.First = first; V.Second = second; }