THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 15:02, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Mac ;
Language(s) : C++ ;
---------
Hello all.
I've got a question that seems really noobish, but I can't figure out how to do it. I'm making a material with a proximal shader, and I want to add the objects that are created in a loop to the object field of it.
BaseMaterial *mat = BaseMaterial::Alloc(Mmaterial);
BaseShader *shader;
InExcludeData *inex;
//Loop stuff
inex->InsertObject(obj, NULL);// the new object to the inexclude
//Loop stuff ends
GeData gedataInexclude; //here's where I'm having trouble I need to convert an Inexclude to a GeData and I can't figure it out.
shader->SetParameter(1015, gedataInexclude, DESCFLAGS_SET_PARAM_SET);//SLA_PROXIMAL_OBJECTS I know I shouldn't do this part like this my my project won't load the res file
mat->SetParameter(MATERIAL_ALPHA_SHADER,shader,DESCFLAGS_SET_PARAM_SET);
mat->InsertShader(shader, NULL);
doc->InsertMaterial(mat);
So I'm stuck on converting the Inexclude to the GeData so I can use it in the SetParameter. Here's what I've been trying to use:
GeData* gedataInexclude;
gedataInexclude->SetCustomDataType(inex,CUSTOMDATATYPE_INEXCLUDE_LIST);
I keep getting errors that there's npo matching function calls and such. I think the problem is I don't understand what SetCustomDataType is looking for.
Any help would be great, thanks in advance!
Dan
(edit: fixed typo in title)