On 09/08/2018 at 21:57, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 19
Platform: Windows ;
Language(s) : C++ ;
---------
I am writing a plugin about controling objects are hided.And i almost finish it except for the last problem.
these objects that i choosed are successed to entering the InExcludeData *List,and it just like the picture.But i found that these objects are not to be hided when rendering,and right now i find the solution to solve the problem(disable the button in the picture: the second button from left to right on on the right side of the abject in LIGHT_EXCLUSION_LIST),But i try so much and can not disable the button on C++code, anyone know how to do it on C++code ?
show me the code:
BaseObject\* HideLightWall = BaseObject::Alloc(Ocube);
HideLightWall = (BaseObject\* )cube->GetClone(COPYFLAGS_NO_HIERARCHY, nullptr);
HideLightWall->SetName(roomFbxObject->fbxName + " - hidewall");
HideLightWall->SetAbsPos(Vector(0, 20, 0));
HideLightWall->SetAbsRot(Vector(0, 0, 0));
HideLightWall->SetAbsScale(Vector(1, 1, 1));
BaseTag\* CompositingTag = HideLightWall->MakeTag(Tcompositing);
CompositingTag->SetParameter(COMPOSITINGTAG_SEENBYTRANSPARENCY, false, DESCFLAGS_SET_0);
CompositingTag->SetParameter(COMPOSITINGTAG_SEENBYCAMERA, false, DESCFLAGS_SET_0);
//CompositingTag->SetParameter(COMPOSITINGTAG_CASTSHADOW, false, DESCFLAGS_SET_0);
BaseObject\* baseObj = doc->SearchObject(roomFbxObject->fbxName);
HideLightWall->InsertUnder(baseObj);
BaseContainer \*obj = light->GetDataInstance();
InExcludeData \*List = (InExcludeData\* )obj->GetCustomDataType(LIGHT_EXCLUSION_LIST, CUSTOMDATATYPE_INEXCLUDE_LIST);
baseObj->SetParameter(RENDERPROGRESSTYPE_GLOBALILLUMINATION,false, DESCFLAGS_SET_0);
List->InsertObject(HideLightWall, 1);
light->SetParameter(LIGHT_EXCLUSION_MODE, LIGHT_EXCLUSION_MODE_EXCLUDE, DESCFLAGS_SET_0);