|
Great that’s exactly what I need.
I found a way to discover if a KFbxObject is a Group by using the runtime type name; if so I then cast to KFbxSelectionSet as you explained:
void ProcessGroups(const KFbxScene* pScene)
{
for(int i = 0; i < pScene->GetMemberCount() i++)
{
KFbxObject* pMember = pScene->GetMember(i)
if(IsGroup(pMember))
{
KArrayTemplate<KFbxSelectionNode*> selectionNodeList;
KArrayTemplate<KFbxObject*> directObjectList;
((KFbxSelectionSet* )pMember)->GetSelectionNodesAndDirectObjects(selectionNodeList, directObjectList)
ProcessChildren(directObjectList)
}
}
}
bool IsGroup(const KFbxObject* pObject)
{
kFbxClassId runClassId = pObject->GetRuntimeClassId()
const char* runClassName = runClassId.GetName()
if(!strcmp(runClassName, "GroupSelection_Default"))
return true;
return false; }
Thanks a lot
Author: nazcaspider
|