Fioxed dictionary being recreated every step of the for loop.
This commit is contained in:
@@ -19,9 +19,9 @@ namespace BlendFile.DNA {
|
||||
public int slot_handle;
|
||||
[DNAFieldAttribute(4, "uchar", 3, "_pad[4]", "System.Byte[]", false, 4)]
|
||||
public byte[] _pad = new System.Byte[4];
|
||||
[DNAListAttribute(8, "bActionGroup", "**group_array", 2, "bActionGroup", "group_array_num", 1, 8, 0)]
|
||||
[DNAListAttribute(8, "bActionGroup", "**group_array", 2, "bActionGroup", "group_array_num", 1, 8, 8)]
|
||||
public System.Collections.Generic.List<bActionGroup> group_array;
|
||||
[DNAListAttribute(8, "FCurve", "**fcurve_array", 5, "FCurve", "fcurve_array_num", 4, 16, 0)]
|
||||
[DNAListAttribute(8, "FCurve", "**fcurve_array", 5, "FCurve", "fcurve_array_num", 4, 16, 16)]
|
||||
public System.Collections.Generic.List<FCurve> fcurve_array;
|
||||
public ActionChannelBag() {
|
||||
this.slot_handle = default;
|
||||
|
||||
@@ -184,9 +184,9 @@ namespace CodeGenerator {
|
||||
ctd.Members.Add(cmf);
|
||||
}
|
||||
|
||||
Dictionary<string, int> listCountOffsets = new();
|
||||
//Add the lists to the class
|
||||
for (var index = 0; index < type.Fields.Count; index++) {
|
||||
Dictionary<string, int> listCountOffsets = new();
|
||||
var field = type.Fields[index];
|
||||
//Skip fields that are not part of a list
|
||||
if (listFields.Select(f => f.Item1).Contains(field)) {
|
||||
|
||||
Reference in New Issue
Block a user