Update Picture Viewer from Videopost
-
On 08/04/2016 at 03:08, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14-R17
Platform:
Language(s) :---------
Hi! Is it possible to update the Picture Viewer while rendering? I'm rendering into a VPBuffer from a
VideoPost plugin. Currently it only updates the Picture Viewer when it goes on to the next frame or
when I force it to by dragging along the timeline or dragging the picture around.Thanks in advance!
Niklas -
On 11/04/2016 at 02:12, xxxxxxxx wrote:
Hello,
changes to the VPBuffer should be visible in the Picture Viewer window. This example updates just fine while "rendering". But it seems the Picture Viewer only updates a few times per second.
VPBuffer* colorBuf = vps->render->GetBuffer(VPBUFFER_RGBA, NOTOK); Int32 const xres = colorBuf->GetInfo(VPGETINFO_XRESOLUTION); Int32 const yres = colorBuf->GetInfo(VPGETINFO_YRESOLUTION); Random rnd; for (Int32 y = 0; y < yres; ++y) { for (Int32 x = 0; x < xres; ++x) { this->SetPixelBuffer(x, y, Vector(rnd.Get01(), rnd.Get01(), rnd.Get01()), colorBuf); if (vps->thread->TestBreak()) return RENDERRESULT_USERBREAK; } GeSleep(20); }
The SetPixelBuffer () utility function simply sets the given VPBuffer using GetLine()/SetLine(). Do you do something different?
Best wishes,
Sebastian