THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/05/2011 at 12:44, xxxxxxxx wrote:
Cinema 4D Version: 12
Platform: Windows ; Mac ;
Language(s) : C++ ;
How can one go about inserting a new Multipass layer (i.e VPBUFFER_OBJECTBUFFER) into the RenderData? The RenderData has a method InsertMultipass which takes a MultipassObject*, but the MultipassObject has no allocation methods. So essentially I am asking how can I allocate a MultipassObject*.
I've tried using BaseList2D::Alloc(VPBUFFER_OBJECTBUFFER) and casting the resulting pointer to a MultipassObject to no avail.
Thanks in advance,
On 23/05/2011 at 02:18, xxxxxxxx wrote:
A multipass is allocted and inserted like this:
RenderData *rd = doc->GetActiveRenderData();
MultipassObject *mpo = NULL;
mpo = (MultipassObject* )MultipassObject::Alloc(Zmultipass);
if (!mpo) return FALSE;
BaseContainer *data = mpo->GetDataInstance();
I will include this into the docs.
On 23/05/2011 at 08:58, xxxxxxxx wrote:
Could you please consider adding this line of code in your docs example as well:
rd->SetParameter(RDATA_MULTIPASS_ENABLE, 1, DESCFLAGS_SET_0); // Enable the multi pass option
That way people reading that SDK will also know how to enable it too.
Just a friendly suggestion ,
On 23/05/2011 at 10:15, xxxxxxxx wrote:
Thanks Matthias! That is exactly what I needed to know.