On 22/09/2015 at 06:49, xxxxxxxx wrote:
Really?
So I had to reproduce this from RenderData....
RENDERRESULT Blendy360CamVP::Execute(BaseVideoPost *node, VideoPostStruct *vps)
{
// For each RENDER
if (vps->vp==VIDEOPOSTCALL_FRAMESEQUENCE && vps->open)
{
//mStChannelCount = node->StereoGetCameraCountRenderer( doc, rd );
mStChannelCount = mCamera->StereoGetCameraCount( doc, bd, rd, 0 );
bStereoEnabled = ( mStChannelCount > 0 );
mStChannelOrder[0] = -1;
mStChannelOrder[1] = -1;
mStChannelSequential = -1;
mStCurrentChannel = -1;
BlendyDebug("StereoGetCameraCount = %d\n",mStChannelCount);
if ( bStereoEnabled )
{
bStereoEnabled = ! renderData.GetBool( RDATA_STEREO_CALCULATE_ORIGINAL );
mStMode = renderData.GetLong( RDATA_STEREO_MODE );
mStCalcResult = renderData.GetLong( RDATA_STEREO_CALCRESULT );
bStAlignmentHorizontal = ( renderData.GetBool( RDATA_STEREO_SBS_ALIGN ) == RDATA_STEREO_SBS_ALIGN_HORIZONTAL );
bStAlignmentVertical = ( renderData.GetBool( RDATA_STEREO_SBS_ALIGN ) == RDATA_STEREO_SBS_ALIGN_VERTICAL );
mStPixelParallax = renderData.GetLong( RDATA_STEREO_PARALLAX );
if ( bStereoEnabled )
{
if ( mStCalcResult == RDATA_STEREO_CALCRESULT_SINGLE )
{
mStChannelCount = 1;
mStChannelOrder[0] = renderData.GetLong( RDATA_STEREO_SINGLECHANNEL ) - 1;
}
// C4D will swap when merging
// else if ( renderData.GetLong( RDATA_STEREO_SWAP ) )
// {
// mStChannelOrder[0] = 1;
// mStChannelOrder[1] = 0;
// }
else
{
mStChannelOrder[0] = 0;
mStChannelOrder[1] = 1;
}
}
}
}
//
// Before each FRAME
else if (vps->vp==VIDEOPOSTCALL_RENDER && vps->open)
{
if ( bStereoEnabled && ! bPreviewRender )
{
mStChannelSequential = ( mStChannelSequential + 1 ) % mStChannelCount;
mStCurrentChannel = ( mStChannelSequential < 2 ? mStChannelOrder[ mStChannelSequential ] : -1 );
if ( mStCurrentChannel >= 0 )
{
mCamera->StereoGetCameraInfo( doc, bd, rd, mStCurrentChannel, mStCameraInfo, 0 );
BlendyDebug("stereo channel [%d] off [%.2f,%.2f] name [%s]",mStCurrentChannel,(float)mStCameraInfo.off_x,(float)mStCameraInfo.off_y,mStCameraInfo.strName.GetCStringCopy());
}
}
}