Esempio n. 1
0
 public override void Serialize(MoSerializer archive)
 {
     archive.Serialize(CurrentStatus);
     if (!InitialKeyFrame.IsInitialKeyFrame)
     {
         throw new InvalidOperationException("IsInitial property of InitialKeyFrame must be true.");
     }
     archive.Serialize(InitialKeyFrame);
     archive.SerializeList(KeyFrames);
 }
Esempio n. 2
0
        public override void Serialize(MoSerializer archive)
        {
            archive.WriteByte(Index);
            archive.WriteByteString(Name, 100);
            archive.WriteByteString(Path, 256);
            archive.WriteByte(RenderingOrder);

            if (!InitialKeyFrame.IsInitialKeyFrame)
            {
                throw new InvalidOperationException("IsInitial property of InitialKeyFrame must be true.");
            }
            archive.Serialize(InitialKeyFrame);
            archive.SerializeList(KeyFrames);
            archive.Serialize(CurrentStatus);
            archive.WriteByte((byte)(IsAdditiveBlending ? 1 : 0));
        }
Esempio n. 3
0
 public override void Serialize(MoSerializer archive)
 {
     archive.WriteByteString(Signature, 30);
     archive.WriteByteString(ModelName, 20);
     archive.SerializeList(BoneKeyFrames);
     archive.SerializeList(MorphKeyFrames);
     archive.SerializeList(CameraKeyFrames);
     archive.SerializeList(LightKeyFrames);
     archive.SerializeList(SelfShadowKeyFrames);
     archive.SerializeList(ModelKeyFrames);
 }
Esempio n. 4
0
        public override void Serialize(MoSerializer archive)
        {
            archive.WriteByte(Index);
            archive.WriteVariableString(Name);
            archive.WriteVariableString(NameEn);
            archive.WriteByteString(Path, 256);
            archive.WriteByte(TimelinePanelRowsCount);

            archive.WriteInt32(BoneNames.Count);
            foreach (string name in BoneNames)
            {
                archive.WriteVariableString(name);
            }
            archive.WriteInt32(MorphNames.Count);
            foreach (string name in MorphNames)
            {
                archive.WriteVariableString(name);
            }
            archive.WriteInt32(IKBoneIndices.Count);
            foreach (int idx in IKBoneIndices)
            {
                archive.WriteInt32(idx);
            }
            archive.WriteInt32(ExternalParentBoneIndices.Count);
            foreach (int idx in ExternalParentBoneIndices)
            {
                archive.WriteInt32(idx);
            }

            archive.WriteByte(RenderingOrder);
            archive.WriteByte((byte)(IsVisible ? 1 : 0));
            archive.WriteInt32(SelectedBoneIndex);
            archive.Serialize(MorphPanel);
            archive.WriteByte((byte)BoneGroupsExpansion.Count);
            foreach (bool item in BoneGroupsExpansion)
            {
                archive.WriteByte((byte)(item ? 1 : 0));
            }
            archive.WriteInt32(TimelinePanelTopRowIndex);
            archive.WriteInt32(LastFrameIndex);

            archive.SerializeListWithoutCount(InitialBoneKeyFrames);
            archive.SerializeList(BoneKeyFrames);
            archive.SerializeListWithoutCount(InitialMorphKeyFrames);
            archive.SerializeList(MorphKeyFrames);
            archive.Serialize(InitialModelKeyFrame);
            archive.SerializeList(ModelKeyFrames);

            archive.SerializeListWithoutCount(CurrentBoneStatuses);
            archive.SerializeListWithoutCount(CurrentMorphStatuses);
            foreach (bool status in IKBonesEnabled)
            {
                archive.WriteByte((byte)(status ? 1 : 0));
            }
            archive.SerializeListWithoutCount(ExternalParentStatuses);

            archive.WriteByte((byte)(IsAdditiveBlending ? 1 : 0));
            archive.WriteSingle(EdgeWidth);
            archive.WriteByte((byte)(IsSelfShadowEnabled ? 1 : 0));
            archive.WriteByte(CalculationOrder);
        }
Esempio n. 5
0
 public override void Serialize(MoSerializer archive)
 {
     archive.WriteInt32(KeyFrameIndex);
     archive.WriteByte((byte)(IsVisible ? 1 : 0));
     archive.SerializeList(IKData);
 }