protected override void OnPopulate() { InitGroups(); _linker = new ModelLinker(Header); _assets = new AssetStorage(_linker); try { //Set def flags _hasMix = _hasOpa = _hasTree = _hasXlu = false; if (_linker.Defs != null) { foreach (ResourcePair p in *_linker.Defs) { if (p.Name == "NodeTree") { _hasTree = true; } else if (p.Name == "NodeMix") { _hasMix = true; } else if (p.Name == "DrawOpa") { _hasOpa = true; } else if (p.Name == "DrawXlu") { _hasXlu = true; } } } _boneGroup.Parse(this); _matGroup.Parse(this); _shadGroup.Parse(this); _polyGroup.Parse(this); //Texture group doesn't need parsing //It's only used as a name reference/link and will be re-created on build. //Eliminate influences with no references? } finally { //Clean up! _assets.Dispose(); _assets = null; _linker = null; CleanGroups(); } }