Beispiel #1
0
        static void TestStaticObject()
        {
            StaticObject sco = StaticObject.ReadSCB("aatrox_base_w_ground_ring.scb");

            sco.WriteSCO(@"C:\Users\Crauzer\Desktop\zzzz.sco");

            StaticObject x = StaticObject.ReadSCB(@"C:\Users\Crauzer\Desktop\zzzz.scb");
        }
Beispiel #2
0
        private static void ConvertScbToGltf(FileConversionParameter parameter)
        {
            WadEntry     staticObjectWadEntry = parameter.Parameter;
            StaticObject staticObject         = StaticObject.ReadSCB(staticObjectWadEntry.GetDataHandle().GetDecompressedStream());
            ModelRoot    gltf = staticObject.ToGltf();

            gltf.SaveGLB(Path.ChangeExtension(parameter.OutputPath, "glb"));
        }
Beispiel #3
0
        private static void ConvertScbToGltf(FileConversionParameter parameter)
        {
            WADEntry staticObjectWadEntry = parameter.Parameter;

            using MemoryStream stream = new MemoryStream(staticObjectWadEntry.GetContent(true));
            StaticObject staticObject = StaticObject.ReadSCB(stream);
            ModelRoot    gltf         = staticObject.ToGltf();

            gltf.SaveGLB(Path.ChangeExtension(parameter.OutputPath, "glb"));
        }
Beispiel #4
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);
            }
        }
        public override void reader(MFileObject file, string optionsString, FileAccessMode mode)
        {
            if (mode == FileAccessMode.kImportAccessMode)
            {
                string name = Path.GetFileNameWithoutExtension(file.expandedFullName).Replace('.', '_');

                StaticObject scb = StaticObject.ReadSCB(file.expandedFullName);
                scb.Load(name);
            }
            else
            {
                throw new ArgumentException("SCBImporter:reader - Invalid File Access Mode: " + mode, "mode");
            }
        }
Beispiel #6
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);
            }
        }