i published the .cpp code for the mcjColllider node (plugin) for DS4.5
https://sites.google.com/site/mcasualsdazscripts2/mcjcolliderds45
here’s how i handle selected bones
DzSkeleton *targetNode;
DzFaceGroup *faceGroup;
for( int n = 0; n < numTargetNodes; n++ )
{
targetNode = (DzSkeleton*) targetList.at( n );
if( !targetNode )
{
return( false );
} //cause for concerm
bool bIsAbone;
DzFacetMesh *targetMesh = 0;
if( targetNode->inherits( "DzBone" ) )
{
bIsAbone = true;
QString boneName = targetNode->getName();
targetNode = targetNode->getSkeleton();
targetMesh = getCachedMesh( targetNode );
if( targetMesh )
{
faceGroup = targetMesh->findFaceGroup( boneName );
}
}
else
{
bIsAbone = false;
targetMesh = getCachedMesh( targetNode );
}
if the object is a bone, i go through the faces in the faceGroup
if it’s a figure or a prop, i go through all the faces of the mesh