diff --git a/BlendFile/DNAAttribute.cs b/BlendFile/DNAAttribute.cs new file mode 100644 index 0000000..5d4f8dc --- /dev/null +++ b/BlendFile/DNAAttribute.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; + + +namespace BlendFile { + + [AttributeUsageAttribute(AttributeTargets.All)] + public class DNAAttribute : System.Attribute { + private int _OriginalIndex; + public virtual int OriginalIndex { + get { + return this._OriginalIndex; + } + set { + this._OriginalIndex = value; + } + } + private string _OriginalName; + public virtual string OriginalName { + get { + return this._OriginalName; + } + set { + this._OriginalName = value; + } + } + public DNAAttribute(int OriginalIndex, string OriginalName) { + this._OriginalIndex = OriginalIndex; + this._OriginalName = OriginalName; + } + } +} diff --git a/BlendFile/DNAListAttribute.cs b/BlendFile/DNAListAttribute.cs new file mode 100644 index 0000000..8098f3e --- /dev/null +++ b/BlendFile/DNAListAttribute.cs @@ -0,0 +1,100 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; + + +namespace BlendFile { + + [AttributeUsageAttribute(AttributeTargets.Property | AttributeTargets.Field)] + public class DNAListAttribute : System.Attribute { + private int _Size; + public virtual int Size { + get { + return this._Size; + } + set { + this._Size = value; + } + } + private string _OriginalType; + public virtual string OriginalType { + get { + return this._OriginalType; + } + set { + this._OriginalType = value; + } + } + private string _OriginalName; + public virtual string OriginalName { + get { + return this._OriginalName; + } + set { + this._OriginalName = value; + } + } + private int _OriginalIndex; + public virtual int OriginalIndex { + get { + return this._OriginalIndex; + } + set { + this._OriginalIndex = value; + } + } + private string _UnderlyingType; + public virtual string UnderlyingType { + get { + return this._UnderlyingType; + } + set { + this._UnderlyingType = value; + } + } + private string _CountFieldName; + public virtual string CountFieldName { + get { + return this._CountFieldName; + } + set { + this._CountFieldName = value; + } + } + private int _CountFieldIndex; + public virtual int CountFieldIndex { + get { + return this._CountFieldIndex; + } + set { + this._CountFieldIndex = value; + } + } + private int _MemoryOffset; + public virtual int MemoryOffset { + get { + return this._MemoryOffset; + } + set { + this._MemoryOffset = value; + } + } + public DNAListAttribute(int Size, string OriginalType, string OriginalName, int OriginalIndex, string UnderlyingType, string CountFieldName, int CountFieldIndex, int MemoryOffset) { + this._Size = Size; + this._OriginalType = OriginalType; + this._OriginalName = OriginalName; + this._OriginalIndex = OriginalIndex; + this._UnderlyingType = UnderlyingType; + this._CountFieldName = CountFieldName; + this._CountFieldIndex = CountFieldIndex; + this._MemoryOffset = MemoryOffset; + } + } +} diff --git a/BlenderSharp.sln.DotSettings.user b/BlenderSharp.sln.DotSettings.user index c2939a6..a3f3dac 100644 --- a/BlenderSharp.sln.DotSettings.user +++ b/BlenderSharp.sln.DotSettings.user @@ -1,5 +1,6 @@  ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded diff --git a/CodeGenerator/Program.cs b/CodeGenerator/Program.cs index b8d4118..bae59d2 100644 --- a/CodeGenerator/Program.cs +++ b/CodeGenerator/Program.cs @@ -432,7 +432,7 @@ namespace CodeGenerator { var dimensions = GetArrayDimensions(name); // Get clean field name (without array brackets) - name = field.Name.ParseFName().Substring(0, field.Name.IndexOf('[')); + name = field.Name.Substring(0, field.Name.IndexOf('[')).ParseFName(); //Check if the type is a built-in type or a custom type if (t != null) cmf = new(t, name); //Built-in type