Beispiel #1
0
        internal override void Write(ResourceWriter writer)
        {
            if (Textures != null)
            {
                writer.WriteResourceChunk(Textures);
            }

            if (Materials != null)
            {
                writer.WriteResourceChunk(Materials);
            }

            if (Scene != null)
            {
                writer.WriteResourceChunk(Scene);
            }

            if (ChunkType000100F9 != null)
            {
                writer.WriteResourceChunk(ChunkType000100F9);
            }

            if (ChunkType000100F8 != null)
            {
                writer.WriteResourceChunk(ChunkType000100F8);
            }

            if (AnimationPack != null)
            {
                writer.WriteResourceChunk(AnimationPack);
            }

            bool animationOnly = AnimationPack != null &&
                                 Textures == null &&
                                 Materials == null &&
                                 Scene == null &&
                                 ChunkType000100F9 == null &&
                                 ChunkType000100F8 == null;

            // end chunk is not present in gap files
            if (!animationOnly)
            {
                writer.WriteEndChunk(Version);
            }
        }