示例#1
0
        private static void ConvertScbToObj(FileConversionParameter parameter)
        {
            WadEntry     staticObjectWadEntry = parameter.Parameter;
            StaticObject staticObject         = StaticObject.ReadSCB(staticObjectWadEntry.GetDataHandle().GetDecompressedStream());
            var          objs = staticObject.ToObj();

            string baseName = Path.GetFileNameWithoutExtension(parameter.OutputPath);

            foreach ((string material, OBJFile obj) in objs)
            {
                string objPath = parameter.OutputPath.Replace(baseName, baseName + '_' + material);
                obj.Write(objPath);
            }
        }
示例#2
0
        private static void ConvertScbToObj(FileConversionParameter parameter)
        {
            WADEntry staticObjectWadEntry = parameter.Parameter;

            using MemoryStream stream = new MemoryStream(staticObjectWadEntry.GetContent(true));
            StaticObject staticObject = StaticObject.ReadSCB(stream);
            var          objs         = staticObject.ToObj();

            string baseName = Path.GetFileNameWithoutExtension(parameter.OutputPath);

            foreach ((string material, OBJFile obj) in objs)
            {
                string objPath = parameter.OutputPath.Replace(baseName, baseName + '_' + material);
                obj.Write(objPath);
            }
        }