THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/09/2003 at 06:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.207
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
I want to write a depth channel into a file. I'm trying to do this in a VideoPost plugin, but all the depths are coming out the same.
As a test I tried saving the depth multipass channel from the user interface and that came out with all pixels the same.
Here's what I'm doing:
void EpixWriterData::AllocateBuffers(PluginVideoPost *node, Render *render, BaseDocument * )
{
render->AllocateBuffer(VPBUFFER_DEPTH, 0, 32, FALSE);
}
LONG EpixWriterData::Execute(PluginVideoPost *node, VideoPostStruct *vps)
{
if (vps->vp==VP_INNER && !vps->open)
{
VPBuffer *depth=vps->render->GetBuffer(VPBUFFER_DEPTH, 0);
long wd=depth->GetBw();
float depthline[1024];
depth->GetLine(0, 0, wd, depthline, 32, false);
Should this work, or do I need to do this in ExecuteLine or ExecutePixel?
Thanks
Arvan