Hello,
I am working on an object plugin that is retrieving points from a MoGraph Matrix for use by the plugin. Per recommendations from a previous forum post I am using this code to retrieve the points.
BaseTag *tmp = mographObj->GetTag(ID_MOTAGDATA);
if (!tmp)
continue;
// populate the GetMoDataMessage instance by sending a MSG_GET_MODATA
GetMoDataMessage modataMsg;
if (!tmp->Message(MSG_GET_MODATA, &modataMsg))
continue;
// access the MoData from the returned GetMoDataMessage and check its validity
MoData *matrixData = modataMsg.modata;
if (!matrixData)
continue;
// retrieve the number of Matrix items as well as the array containing the matrix for each of them
Int32 matrixItemsCnt = matrixData->GetCount();
Matrix* itemsMtxArray = static_cast<Matrix*>(matrixData->GetArray(MODATA_MATRIX));
// Properly cycles through the contents of the matrix and gets all of the positions of the points
for (Int32 matrixIndex = 0; matrixIndex < matrixItemsCnt; matrixIndex++)
{
dataContainer.pos = itemsMtxArray[matrixIndex].off;
}
This code works perfectly fine retrieving the points from a Mograph when the "Form" control is set to Cubic. When the control is set to one of the other options such as Sphere or Cylinder, where the amount of points has now visually changed, I am still receiving all of the points as if it was still set to Cubic.
My question is, is there an alternative way to retrieve just the points that are shown by the Matrix while its Form control is set to one of the other choices besides Cubic?
Any help would be greatly appreciated.
John,