Selecting a Sibling Material

In the 3ds Max Material Editor "Go Forward To Sibling" moves to the next map or material at the same level in the current material. This button is available only when you are not at the top level of a compound material, and there is more than one map or material at the current level.

Below shows how to do this programmatically:

bool SelectNextSibling()
{
   Interface *ip = GetCOREInterface();
   if (ip == NULL){
      return false;
   }
   ip->Execute(MAXCOM_SELECT_NEXTSIBLING, 0);
   return true;
}
 
bool SelectPrevSibling()
{
   Interface *ip = GetCOREInterface();
   if (ip == NULL){
      return false;
   }
   ip->Execute(MAXCOM_SELECT_PREVSIBLING, 0);
   return true;
}