| Platform SDK: Agent |
HRESULT GetAnimationNames( IUnknown ** punkEnum // address of IUnknown inteface );
Retrieves the animation names for a character.
This function enables you to enumerate the names of the animations for a character. Items in the collection have no properties, so individual items cannot be accessed directly. To access the collection, query punkEnum for the IEnumVARIANT interface:
IEnumVARIANT pEnum;
VARIANT vAnimName;
DWORD dwRetrieved;
hRes = punkEnum->QueryInterface(IID_IEnumVARIANT, (LPVOID *)&pEnum);
if (SUCCEEDED(hRes)) {
while (TRUE) {
hRes = pEnum->Next(1, &vAnimName, &dwRetrieved);
if (hRes != NOERROR)
break;
// vAnimName.bstrVal is the animation name
VariantClear(&vAnimName);
}
pEnum->Release();
}
punkEnum->Release();
Note For ACF characters, the collection returns all the animations that have been defined for the character, adding to the ones that have been retrieved with the Get method.