Max Skin Modifier
Hi Guys,
Kinda new to this... hope someone can give me a hand. I''m working on a model exporter for Max. It''s dropping out the geometry etc without any problems, but I''m having trouble with getting information about skinned models. The following is a snippet of code that I''m using to check for a skin modifier.
mc = NULL;
if(Object* pObj = node->GetObjectRef())
{
while(pObj->SuperClassID()==GEN_DERIVOB_CLASS_ID && mc==NULL)
{
IDerivedObject* pDerObj = (IDerivedObject *)(pObj);
int Idx = 0;
while(IdxNumModifiers())
{
Modifier* mod = pDerObj->GetModifier(Idx);
if(mod->ClassID() == SKIN_CLASSID)
{
mc = pDerObj->GetModContext(Idx);
break;
}
Idx++;
}
pObj = pDerObj->GetObjRef();
}
}
If mc exits as !NULL then mc->localdata should be a pointer to ISkinContextData (I think!) and I should then be able to do something along the lines of...
ISCD = (ISkinContextData*)mc->localData;
int bones = ISCD->GetNumAssignedBones(0);
...to find the number of bones in use by a vertex(0), but all I get is a pointer to something (Large memory address like figure). Can''t work out what it is and can''t find any example source to butcher. Any help would be really great. Hopefully I''m not spouting a load of tosh!
Thanks in advance!
Bert
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement