On 09/10/2014 at 06:34, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 15
Platform: Windows ;
Language(s) : C++ ;
---------
Hi Plugincafe,
I'm writing a VideoPostData plugin. In this example I simply write all white to the RGBA buffer and call SkipRenderProcess(). Everything works fine for Editor Viewport, Picture Viewer and even Active Render Region. The "Render Region" although seems to hand wrong parameters to my plugin, the dimensions are the one for the whole Editor Viewport instead of the render region. So the result is that the whole Editor Viewport is white instead of only the selected region. Here is an image which should make it clear. The Code is given below.
RENDERRESULT MyVideoPostPlugin::Execute(BaseVideoPost* node, VideoPostStruct* vps)
{
if (vps->error == nullptr || *vps->error != RENDERRESULT_OK || vps->thread->TestBreak())
{
// After skipping the render process vps->error is set, so we end up here and return
return RENDERRESULT_OK;
}
if (vps->vp == VIDEOPOSTCALL_INNER && vps->open)
{
BaseObject* pBaseObject = (BaseObject* )node;
BaseContainer* pBaseContainer = pBaseObject->GetDataInstance();
VPBuffer\* pVpBuffer = vps->render->GetBuffer(VPBUFFER_RGBA, 0);
// fill pVpBuffer with custom render data, in my example just white
vps->vd->SkipRenderProcess();
return RENDERRESULT::RENDERRESULT_USERBREAK;
}
return RENDERRESULT_OK;
}