static void Main(string[] args) { //var document = FbxIO.ReadBinary(args[0]); //FbxIO.WriteAscii(document, Path.GetDirectoryName(args[0]) + "/test_ascii.fbx"); var reader = new FbxAsciiReader(new FileStream(Path.GetDirectoryName(args[0]) + "/test_ascii.fbx", FileMode.Open)); var doc = reader.Read(); FbxIO.WriteAscii(doc, Path.GetDirectoryName(args[0]) + "/test_ascii_2.fbx"); }
/// <summary> /// Reads an ASCII FBX file /// </summary> /// <param name="path"></param> /// <returns>The top level document node</returns> public static FbxDocument ReadAscii(string path) { if (path == null) throw new ArgumentNullException(nameof(path)); using (var stream = new FileStream(path, FileMode.Open)) { var reader = new FbxAsciiReader(stream); return reader.Read(); } }
/// <summary> /// Reads an ASCII FBX file /// </summary> /// <param name="path"></param> /// <returns>The top level document node</returns> public static FbxDocument ReadAscii(string path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } using (var stream = new FileStream(path, FileMode.Open)) { var reader = new FbxAsciiReader(stream); return(reader.Read()); } }