// ヘビーセーブファイルを保存する. public void SavePNGFile(PNGFile png, Stream stream) { png.WriteTaOb += delegate(BinaryWriter bw) { if (posedata.scene == false) { WriteTDCG(bw); WritePOSE(bw); WriteCAMI(bw, posedata.camera); WriteLGTA(bw, posedata.figures[0].light.data); WriteFTMO(bw, posedata.figures[0].tmo.data); } else { WriteTDCG(bw); WriteSCNE(bw, posedata.nfig); WriteCAMI(bw, posedata.camera); foreach (PNGPoseFigureData figure in posedata.figures) { WriteLGTA(bw, figure.light.data); WriteFTMO(bw, figure.tmo.data); WriteFIGU(bw, figure.data); foreach (PNGTsoData tso in figure.tsos) { WriteFTSO(bw, tso.tsoID, tso.tsodata); } } } }; png.Save(stream); }
// ヘビーセーブファイルを保存する. public void SavePNGFile(PNGFile png, Stream stream) { png.WriteTaOb += delegate(BinaryWriter bw) { // TaOBを書き出す. WriteTDCG(bw); WriteHSAV(bw); foreach (PNGTsoData tsodata in tsoData) { WriteFTSO(bw, tsodata); } }; png.Save(stream); }