From eda218ecb44383e5f964ba80e6823315715b905a Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 28 May 2006 12:30:09 +0000 Subject: Step one in bringing back Yafray Render in Blender. Need someone else to take over now, but I'm available for help. Main notes for completing: - Yafray module uses old global R all over... is now a pointer handle. It can be temporally bypassed by straight copying, which I do now. - I am not sure in what pixel format Yafray renders... Blender now only uses float buffers. In the code, marked with XXX I've added the rudimentary code for retrieving buffers. - This integration will skip compositing when Yafray render is used. --- source/blender/yafray/intern/export_File.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/yafray/intern/export_File.cpp') diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index d9124c902c2..dfd89eca722 100755 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -289,6 +289,13 @@ void yafrayFileRender_t::displayImage() unsigned int idlen = (unsigned int)header[0]; if (idlen) fseek(fp, idlen, SEEK_CUR); + /* XXX how to get the image from Blender and write to it. This call doesn't allow to change buffer rects */ + RenderResult rres; + RE_GetResultImage(&R, &rres); + // rres.rectx, rres.recty is width/height + // rres.rectf is float buffer, scanlines starting in bottom + // rres.rectz is zbuffer, available when associated pass is set + // read data directly into buffer, picture is upside down for (unsigned short y=0;y