Fixed list length value returning always zero.

Added separated pointer and count memory offsets to list attributes.
Tried handling them
This commit is contained in:
Samuele Lorefice
2025-03-06 19:11:03 +01:00
parent 0bc7f73aee
commit fb50e3fa44
12 changed files with 75 additions and 48 deletions

View File

@@ -77,16 +77,25 @@ namespace BlendFile {
this._CountFieldIndex = value;
}
}
private int _MemoryOffset;
public virtual int MemoryOffset {
private int _PtrMemoryOffset;
public virtual int PtrMemoryOffset {
get {
return this._MemoryOffset;
return this._PtrMemoryOffset;
}
set {
this._MemoryOffset = value;
this._PtrMemoryOffset = value;
}
}
public DNAListAttribute(int Size, string OriginalType, string OriginalName, int OriginalIndex, string UnderlyingType, string CountFieldName, int CountFieldIndex, int MemoryOffset) :
private int _CountMemoryOffset;
public virtual int CountMemoryOffset {
get {
return this._CountMemoryOffset;
}
set {
this._CountMemoryOffset = value;
}
}
public DNAListAttribute(int Size, string OriginalType, string OriginalName, int OriginalIndex, string UnderlyingType, string CountFieldName, int CountFieldIndex, int PtrMemoryOffset, int CountMemoryOffset) :
base(OriginalIndex, OriginalName) {
this._Size = Size;
this._OriginalType = OriginalType;
@@ -95,7 +104,8 @@ namespace BlendFile {
this._UnderlyingType = UnderlyingType;
this._CountFieldName = CountFieldName;
this._CountFieldIndex = CountFieldIndex;
this._MemoryOffset = MemoryOffset;
this._PtrMemoryOffset = PtrMemoryOffset;
this._CountMemoryOffset = CountMemoryOffset;
}
}
}