Hello,
I had previously posted here about accessing a virtual matrix object. I am able to successfully get access to the MoData from the matrix by creating a Matrix set to Object Mode in a virtual document and linking a cloned object to it. Moving along with that process I am now trying to get the MoData from a Boole object utilizing the same process with this code.
BaseContainer *matrixData = matrixObj->GetDataInstance();
matrixData->SetInt32(ID_MG_MOTIONGENERATOR_MODE, 0);
matrixData->SetLink(MG_OBJECT_LINK, cloneObj);
matrixData->SetInt32(MG_POLY_MODE_, 0);
virtualDoc->ExecutePasses(nullptr, true, true, true, BUILDFLAGS::NONE);
BaseTag *tag = matrixObj->GetTag(ID_MOTAGDATA);
if (tag == nullptr)
return maxon::NullptrError(MAXON_SOURCE_LOCATION);
GetMoDataMessage msg = GetMoDataMessage();
tag->Message(MSG_GET_MODATA, &msg);
MoData *md = msg.modata;
if (md == nullptr)
return maxon::NullptrError(MAXON_SOURCE_LOCATION);
MDArray<maxon::Matrix> mdmg = md->GetMatrixArray(MODATA_MATRIX);
This setup is working inside of the live document and does not work inside of the virtual document because no tag for the MoTagData is being created.
If I have the "Create Single Object" checkbox turned on I can successfully generate the tag for the MoData inside of my virtual document, it doesn't matter for the live document.
Can anyone tell me why this behavior is inconsistent between this two circumstances? Any help would be appreciated.
John Thomas