void _ReadSequence(BinaryReader bin, ref Sequence seq, bool readNameIndex)
        {
            if (readNameIndex)
                seq.NameIndex = bin.ReadInt32();

            seq.Flags = (SequenceFlags)bin.ReadUInt32();
            seq.KeyframeCount = bin.ReadInt32();
            seq.Duration = bin.ReadSingle();
            seq.Priority = bin.ReadInt32();
            seq.FirstGroundFrame = bin.ReadInt32();
            seq.GroundFrameCount = bin.ReadInt32();
            seq.BaseRotation = bin.ReadInt32();
            seq.BaseTranslation = bin.ReadInt32();
            seq.BaseScale = bin.ReadInt32();
            seq.BaseObjectState = bin.ReadInt32();
            int baseDecalState = bin.ReadInt32(); // deprecated
            seq.FirstTrigger = bin.ReadInt32();
            seq.TriggerCount = bin.ReadInt32();
            seq.ToolBegin = bin.ReadSingle();
            seq.DoesRotationMatter.Read(bin);
            seq.DoesTranslationMatter.Read(bin);
            seq.DoesScaleMatter.Read(bin);
            BitVector decalMatters = new BitVector(); // deprecated
            decalMatters.Read(bin);
            seq.DoesIflMatter.Read(bin);
            seq.DoesVisibilityMatter.Read(bin);
            seq.DoesFrameMatter.Read(bin);
            seq.DoesMaterialFrameMatter.Read(bin);

            // figure out dirty _flags
            seq.DirtyFlags = 0;

            if (seq.DoesRotationMatter.TestAll() || seq.DoesTranslationMatter.TestAll() || seq.DoesScaleMatter.TestAll())
                seq.DirtyFlags |= DirtyFlags.TransformDirty;

            if (seq.DoesVisibilityMatter.TestAll())
                seq.DirtyFlags |= DirtyFlags.VisDirty;

            if (seq.DoesFrameMatter.TestAll())
                seq.DirtyFlags |= DirtyFlags.FrameDirty;

            if (seq.DoesMaterialFrameMatter.TestAll())
                seq.DirtyFlags |= DirtyFlags.MatFrameDirty;

            if (seq.DoesIflMatter.TestAll())
                seq.DirtyFlags |= DirtyFlags.IflDirty;
        }