Hello,
I am attempting to get the MoData from a Matrix object that hasn't been inserted in the open document, instead its been inserted into a virtual document. Inside of the virtual document I set the parameters of the Matrix object so that it is in Object mode. Once the mode has been changed I insert a clone of an object into the virtual document that is then linked with the Object field of the Matrix object.
BaseDocument *virtualDoc = BaseDocument::Alloc();
BaseObject *matrixObj = BaseObject::Alloc(1018545); // Matrix
if (matrixObj == nullptr)
return nullptr;
BaseObject *cloneObj = (BaseObject*)op->GetDown()->GetClone(COPYFLAGS::NONE, nullptr);
virtualDoc->InsertObject(matrixObj, nullptr, nullptr);
virtualDoc->InsertObject(cloneObj, nullptr, nullptr);
BaseContainer *matrixData = matrixObj->GetDataInstance();
matrixData->SetInt32(ID_MG_MOTIONGENERATOR_MODE, 0);
matrixData->SetLink(MG_OBJECT_LINK, cloneObj);
matrixData->SetInt32(MG_POLY_MODE_, 0);
BaseTag *tmp = matrixObj->GetTag(ID_MOTAGDATA); // Newly inserted Matrix does not have an ID_MOTAGDATA tag
if (!tmp)
return nullptr;
The code runs properly until it attempts to get the tag from the Matrix object, on the initial insertion of the Matrix it doesn't generate its MoTagData tag. Is there a way to force a refresh on the Matrix object so that it generates the MoTagData tag so that I can access the MoData?
Any help would be appreciated,
John Thomas