Beispiel #1
0
        public void AddTexture(string internalPath)
        {
            // adds vmt files and finds its dependencies
            string externalPath = FindExternalFile(internalPath);

            if (AddFile(internalPath, externalPath))
            {
                vmtcount++;
                foreach (string vtf in AssetUtils.findVmtTextures(externalPath))
                {
                    AddFile(vtf, FindExternalFile(vtf));
                }
                foreach (string vmt in AssetUtils.findVmtMaterials(externalPath))
                {
                    AddTexture(vmt);
                }
            }
        }
Beispiel #2
0
        public static void findBspPakDependencies(BSP bsp, string tempdir)
        {
            // Search the temp folder to find dependencies of files extracted from the pak file
            if (Directory.Exists(tempdir))
            {
                foreach (String file in Directory.EnumerateFiles(tempdir, "*.vmt", SearchOption.AllDirectories))
                {
                    foreach (string material in AssetUtils.findVmtMaterials(new FileInfo(file).FullName))
                    {
                        bsp.TextureList.Add(material);
                    }

                    foreach (string material in AssetUtils.findVmtTextures(new FileInfo(file).FullName))
                    {
                        bsp.TextureList.Add(material);
                    }
                }
            }
        }