On 30/03/2016 at 03:04, xxxxxxxx wrote:
Hello and welcome,
Not every object in a Cinema 4D scene has assigned effectors. Only MoGraph generators are linked to MoGraph effectors. When you look at a Cinema 4D scene you see that these effectors are linked using an InExclude list on the MoGraph cloner object.
So to get the effectors that are assigned to a specific cloner you have to read that parameter to obtain that InExclude list. Such a list is stored in form of the InExcludeData data type.
// check if the object is a MoGraph cloner
printf("Found a MoGraph Cloner object\n");
//ID_MG_MOTIONGENERATOR_EFFECTORLIST is 2009
InExcludeData* effectorList = (InExcludeData* )data.GetCustomDataType(CUSTOMDATATYPE_INEXCLUDE_LIST);
const Int32 count = effectorList->GetObjectCount();
for (Int32 i = 0; i < count; ++i)
BaseList2D* linkedObject = effectorList->ObjectFromIndex(loadedDoc, i);
// custom function to print the object name