public static void LoadResourceNode(IntermediateNode root, ILibFile library, out MatFile materials, out TxmFile textures, out Vms.VmsFile vms) { materials = null; textures = null; vms = null; foreach (Node node in root) { switch (node.Name.ToLowerInvariant()) { case "material library": IntermediateNode materialLibraryNode = node as IntermediateNode; materials = new MatFile(materialLibraryNode, library); break; case "texture library": IntermediateNode textureLibraryNode = node as IntermediateNode; try { textures = new TxmFile(textureLibraryNode); } catch (Exception ex) { FLLog.Error("Utf", ex.Message); } break; case "vmeshlibrary": IntermediateNode vmsnode = node as IntermediateNode; vms = new Vms.VmsFile(vmsnode, library); break; } } }
public static void LoadResourceFile(string file, ILibFile library, out MatFile materials, out TxmFile textures, out Vms.VmsFile vms) { materials = null; textures = null; vms = null; var root = parseFile(file); foreach (Node node in root) { switch (node.Name.ToLowerInvariant()) { case "material library": IntermediateNode materialLibraryNode = node as IntermediateNode; materials = new MatFile(materialLibraryNode, library); break; case "texture library": IntermediateNode textureLibraryNode = node as IntermediateNode; textures = new TxmFile(textureLibraryNode); break; case "vmeshlibrary": IntermediateNode vmsnode = node as IntermediateNode; vms = new Vms.VmsFile(vmsnode, library); break; } } }
public static void LoadResourceFile(string file, ILibFile library, out MatFile materials, out TxmFile textures, out Vms.VmsFile vms) { materials = null; textures = null; vms = null; var root = parseFile(file); LoadResourceNode(root, library, out materials, out textures, out vms); }