Renamed BlenderBlend class into BlendFile

This commit is contained in:
Samuele Lorefice
2025-01-23 16:28:34 +01:00
parent b7cd60e4cf
commit 2bd93ab3bb
2 changed files with 38 additions and 39 deletions

View File

@@ -18,9 +18,9 @@ namespace Kaitai {
/// block would be a structure with code `DNA1`, which is a essentially
/// a machine-readable schema of all other structures used in this file.
/// </summary>
public partial class BlenderBlend : KaitaiStruct {
public static BlenderBlend FromFile(string fileName) {
return new BlenderBlend(new KaitaiStream(fileName));
public partial class BlendFile : KaitaiStruct {
public static BlendFile FromFile(string fileName) {
return new BlendFile(new KaitaiStream(fileName));
}
@@ -34,7 +34,7 @@ namespace Kaitai {
Le = 118,
}
public BlenderBlend(KaitaiStream p__io, KaitaiStruct p__parent = null, BlenderBlend p__root = null) : base(p__io) {
public BlendFile(KaitaiStream p__io, KaitaiStruct p__parent = null, BlendFile p__root = null) : base(p__io) {
m_parent = p__parent;
m_root = p__root ?? this;
f_sdnaStructs = false;
@@ -62,7 +62,7 @@ namespace Kaitai {
return new DnaStruct(new KaitaiStream(fileName));
}
public DnaStruct(KaitaiStream p__io, BlenderBlend.Dna1Body p__parent = null, BlenderBlend p__root = null) :
public DnaStruct(KaitaiStream p__io, BlendFile.Dna1Body p__parent = null, BlendFile p__root = null) :
base(p__io) {
m_parent = p__parent;
m_root = p__root;
@@ -95,8 +95,8 @@ namespace Kaitai {
private ushort _idxType;
private ushort _numFields;
private List<DnaField> _fields;
private BlenderBlend m_root;
private BlenderBlend.Dna1Body m_parent;
private BlendFile m_root;
private BlendFile.Dna1Body m_parent;
public ushort IdxType {
get { return _idxType; }
@@ -110,11 +110,11 @@ namespace Kaitai {
get { return _fields; }
}
public BlenderBlend M_Root {
public BlendFile M_Root {
get { return m_root; }
}
public BlenderBlend.Dna1Body M_Parent {
public BlendFile.Dna1Body M_Parent {
get { return m_parent; }
}
}
@@ -124,7 +124,7 @@ namespace Kaitai {
return new FileBlock(new KaitaiStream(fileName));
}
public FileBlock(KaitaiStream p__io, BlenderBlend p__parent = null, BlenderBlend p__root = null) : base(p__io) {
public FileBlock(KaitaiStream p__io, BlendFile p__parent = null, BlendFile p__root = null) : base(p__io) {
m_parent = p__parent;
m_root = p__root;
f_sdnaStruct = false;
@@ -174,8 +174,8 @@ namespace Kaitai {
private uint _sdnaIndex;
private uint _count;
private object _body;
private BlenderBlend m_root;
private BlenderBlend m_parent;
private BlendFile m_root;
private BlendFile m_parent;
private byte[] __raw_body;
/// <summary>
@@ -217,11 +217,11 @@ namespace Kaitai {
get { return _body; }
}
public BlenderBlend M_Root {
public BlendFile M_Root {
get { return m_root; }
}
public BlenderBlend M_Parent {
public BlendFile M_Parent {
get { return m_parent; }
}
@@ -251,7 +251,7 @@ namespace Kaitai {
return new Dna1Body(new KaitaiStream(fileName));
}
public Dna1Body(KaitaiStream p__io, BlenderBlend.FileBlock p__parent = null, BlenderBlend p__root = null) :
public Dna1Body(KaitaiStream p__io, BlendFile.FileBlock p__parent = null, BlendFile p__root = null) :
base(p__io) {
m_parent = p__parent;
m_root = p__root;
@@ -319,8 +319,8 @@ namespace Kaitai {
private byte[] _strcMagic;
private uint _numStructs;
private List<DnaStruct> _structs;
private BlenderBlend m_root;
private BlenderBlend.FileBlock m_parent;
private BlendFile m_root;
private BlendFile.FileBlock m_parent;
public byte[] Id {
get { return _id; }
@@ -382,11 +382,11 @@ namespace Kaitai {
get { return _structs; }
}
public BlenderBlend M_Root {
public BlendFile M_Root {
get { return m_root; }
}
public BlenderBlend.FileBlock M_Parent {
public BlendFile.FileBlock M_Parent {
get { return m_parent; }
}
}
@@ -396,7 +396,7 @@ namespace Kaitai {
return new Header(new KaitaiStream(fileName));
}
public Header(KaitaiStream p__io, BlenderBlend p__parent = null, BlenderBlend p__root = null) : base(p__io) {
public Header(KaitaiStream p__io, BlendFile p__parent = null, BlendFile p__root = null) : base(p__io) {
m_parent = p__parent;
m_root = p__root;
f_psize = false;
@@ -409,8 +409,8 @@ namespace Kaitai {
throw new ValidationNotEqualError(new byte[] { 66, 76, 69, 78, 68, 69, 82 }, Magic, M_Io,
"/types/header/seq/0");
}
_ptrSizeId = ((BlenderBlend.PtrSize)m_io.ReadU1());
_endian = ((BlenderBlend.Endian)m_io.ReadU1());
_ptrSizeId = ((BlendFile.PtrSize)m_io.ReadU1());
_endian = ((BlendFile.Endian)m_io.ReadU1());
_version = System.Text.Encoding.GetEncoding("ASCII").GetString(m_io.ReadBytes(3));
}
@@ -424,7 +424,7 @@ namespace Kaitai {
get {
if (f_psize)
return _psize;
_psize = (sbyte)((PtrSizeId == BlenderBlend.PtrSize.Bits64 ? 8 : 4));
_psize = (sbyte)((PtrSizeId == BlendFile.PtrSize.Bits64 ? 8 : 4));
f_psize = true;
return _psize;
}
@@ -434,8 +434,8 @@ namespace Kaitai {
private PtrSize _ptrSizeId;
private Endian _endian;
private string _version;
private BlenderBlend m_root;
private BlenderBlend m_parent;
private BlendFile m_root;
private BlendFile m_parent;
public byte[] Magic {
get { return _magic; }
@@ -462,11 +462,11 @@ namespace Kaitai {
get { return _version; }
}
public BlenderBlend M_Root {
public BlendFile M_Root {
get { return m_root; }
}
public BlenderBlend M_Parent {
public BlendFile M_Parent {
get { return m_parent; }
}
}
@@ -476,7 +476,7 @@ namespace Kaitai {
return new DnaField(new KaitaiStream(fileName));
}
public DnaField(KaitaiStream p__io, BlenderBlend.DnaStruct p__parent = null, BlenderBlend p__root = null) :
public DnaField(KaitaiStream p__io, BlendFile.DnaStruct p__parent = null, BlendFile p__root = null) :
base(p__io) {
m_parent = p__parent;
m_root = p__root;
@@ -518,8 +518,8 @@ namespace Kaitai {
private ushort _idxType;
private ushort _idxName;
private BlenderBlend m_root;
private BlenderBlend.DnaStruct m_parent;
private BlendFile m_root;
private BlendFile.DnaStruct m_parent;
public ushort IdxType {
get { return _idxType; }
@@ -529,11 +529,11 @@ namespace Kaitai {
get { return _idxName; }
}
public BlenderBlend M_Root {
public BlendFile M_Root {
get { return m_root; }
}
public BlenderBlend.DnaStruct M_Parent {
public BlendFile.DnaStruct M_Parent {
get { return m_parent; }
}
}
@@ -545,7 +545,7 @@ namespace Kaitai {
get {
if (f_sdnaStructs)
return _sdnaStructs;
_sdnaStructs = (List<DnaStruct>)(((BlenderBlend.Dna1Body)(Blocks[(Blocks.Count - 2)].Body)).Structs);
_sdnaStructs = (List<DnaStruct>)(((BlendFile.Dna1Body)(Blocks[(Blocks.Count - 2)].Body)).Structs);
f_sdnaStructs = true;
return _sdnaStructs;
}
@@ -553,7 +553,7 @@ namespace Kaitai {
private Header _hdr;
private List<FileBlock> _blocks;
private BlenderBlend m_root;
private BlendFile m_root;
private KaitaiStruct m_parent;
public Header Hdr {
@@ -564,7 +564,7 @@ namespace Kaitai {
get { return _blocks; }
}
public BlenderBlend M_Root {
public BlendFile M_Root {
get { return m_root; }
}