THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/07/2004 at 06:59, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 7.303
Platform: Windows ;
Language(s) : C++ ;
---------
I'm currently writing an import plugin that successfully loads and creates a PolygonObject. I'm currently running into two problems...
1. when I add the PolygonObject to the document, it adds fine ( ie. doc->InsertObject(op,NULL,NULL); ) , but doesn't 'show up' until the user manipulates the interface.
2. I'm creating some selection tags on the new PolygonObject and those are alo being created fine, but the names I'm giving them are not showing up. Here's a code snippet of what I'm doing:
typedef struct _objGroup
{
String strGroupName;
DWORD numFaces;
DWORD currFace;
DWORD *pFaceIndices;
} objGroup;
void ObjLoader::SetGroups(PolygonObject *op)
{
objGroup *pGroup;
SelectionTag *pSelect;
BaseSelect *pbSelect;
DWORD *pFaceIndices;
DWORD i, j;
pGroup = &m_pGroups[0];
for(i=0; i<m_numGroups; i++)
{
pSelect = (SelectionTag * )op->MakeTag(Tpolyselection);
pSelect->GetData().SetString(POLYSELECTIONTAG_NAME, pGroup->strGroupName);
pFaceIndices = pGroup->pFaceIndices;
pbSelect = pSelect->GetBaseSelect();
for(j=0; j<pGroup->numFaces; j++)
{
pbSelect->Select(*pFaceIndices);
pFaceIndices++;
}
pGroup++;
}
}
...as I mentioned, the selections are created correctly (they include the correct polygons), but the name field is blank.
I'd appreciate any help with either problem.. thanks.
- Keith