3DXI Modifiers

3DXI provides direct access to modifiers using the IGameObject interface with no knowledge of derived objects or internal mechanisms. IGameObject maintains a list of modifiers applied to the object with access to both the name used in the stack and the internal name, so the developer can simply determine if the modifier is needed.

As an extension to this, IGameModifier directly supports the skin deformation modifiers of "max skin" and "physique". Even though both modifiers provide their own APIs, they are quite different. 3DXI provides a unified access to both skin modifiers. By using the method IGameModifier::IsSkin(), the developer can cast to IGameSkin for direct access of weights and bone bindings.

IGameModifier still provides access to the original 3ds Max modifier because some data is user-defined such that 3ds Max can not extract it. This is usually in the form of LocalModData or Per-Face Data, and hence must be accessed directly by the developer who wrote it.

int numMod = igameObj->GetNumModifiers();
 
if(numMod > 0)
{
    for(int i=0;i<numMod;i++)
    {
        IGameModifier * m = igameObj->GetIGameModifier(i);
        // access data here...
    }
}

The IGameModifier interface also provides a list of all the nodes that are affected by the modifier, so, on export, you can choose to export nodes based on modifiers, such as physique.