On 18/08/2016 at 09:12, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :
---------
Hi,
I would like to add Post Effects under Multi-Pass using the code:
rd->SetParameter(RDATA_MULTIPASS_ENABLE, 1, DESCFLAGS_SET_0); // Enable the multi pass option
MultipassObject *mpo = NULL;
mpo = (MultipassObject* )MultipassObject::Alloc(Zmultipass);
if (mpo)
{
BaseContainer *mdata = mpo->GetDataInstance();
mdata->SetInt32(MULTIPASSOBJECT_TYPE, VPBUFFER_POSTEFFECT);
// GeData data;
// data.SetInt32(VPBUFFER_POSTEFFECT);
// mpo->SetParameter(DescID(MULTIPASSOBJECT_TYPE), data, DESCFLAGS_SET_0);
doc->StartUndo();
rd->InsertMultipass(mpo, NULL);
doc->AddUndo(UNDOTYPE_NEW, mpo);
doc->EndUndo();
rd->Message(MSG_UPDATE);
EventAdd();
}
But it adds only an empty line under Multi-Pass. Even using currently commented SetParameter doesn't help.
How to add it programmably?
My example is based on https://plugincafe.maxon.net/topic/5716/5761_multipassobject-allocation&KW=MULTIPASSOBJECT_TYPE&PID=24000#24000 which works well for RGBA, but I need Post Effects too! Please, help.