hello,
I'm not sure if you are talking about a Mograph Cloner
or an Instance
with Instance Mode set to Multi-Instance.
For a Cloner Object you can retrieve the matrices inside the MoData like this
BaseObject *mographObj = doc->GetActiveObject();
if (mographObj == nullptr)
return maxon::NullptrError(MAXON_SOURCE_LOCATION);
BaseTag *tag = mographObj->GetTag(ID_MOTAGDATA);
if (tag == nullptr)
return maxon::NullptrError(MAXON_SOURCE_LOCATION);
// populate the GetMoDataMessage instance by sending a MSG_GET_MODATA
GetMoDataMessage modataMsg;
if (!tag->Message(MSG_GET_MODATA, &modataMsg))
return maxon::UnexpectedError(MAXON_SOURCE_LOCATION);
if (!modataMsg.modata)
return maxon::UnexpectedError(MAXON_SOURCE_LOCATION);
// access the MoData from the returned GetMoDataMessage and check its validity
MoData *moData = modataMsg.modata;
if (!moData)
return maxon::NullptrError(MAXON_SOURCE_LOCATION);
// retrieve the number of Matrix items as well as the array containing the matrix for each of them
maxon::Int32 matrixItemsCnt = moData->GetCount();
maxon::Matrix* itemsMtxArray = static_cast<maxon::Matrix*>(moData->GetArray(MODATA_MATRIX));
If you are using An InstanceObject you can check our manual .
As @fwilleke80 said you have GetInstanceMatrices
or you can read the multi-instanceData (example in the manual)
Cheers,
Manuel.