Doesn't look like there is a function already in the SkeletonRenderer class, but here's some code:
// \brief returns the name of the current attachment
std::string getSlotAttachment( const std::string& theSlotName )
{
if(_skeleton)
{
for(int i = 0; i < _skeleton->slotsCount; ++i)
if( strcmp(theSlotName.c_str(), _skeleton->slots[i]->data->name) == 0 && _skeleton->slots[i]->attachment)
return std::string(_skeleton->slots[i]->attachment->name);
}
return "";
}
Before petitioning that something like this becomes part of the official class implementation, I would rather suggest something like...
spSkeleton* getSkeleton() { return _skeleton; }
...instead because it covers more corner cases.