[3ds Max] Python SDK - Skinning data

Accessing skin modifier data via Maxscript is slow so I thought I’d try getting it via the Python SDK.

We have it working fine via the C++ SDK in an export plugin but I can’t seem to work out the interface ID to pass the GetInterface function in Python.

C++:
ISkin *skin = (ISkin *)mod->GetInterface(I_SKIN);

Python:
skin = mod.GetInterface( ? )

I’m assuming that ? should be an interface object, but I can’t seem to find the value for it.

Anybody have any idea?

See this GetInterface related question, to get the interface you want, the GetInterface method would have to accept other values than MaxPlus.InterfaceID (and it doesn’t).

So from reading that would I be correct in assuming the following is correct:

skin= mod.GetInterface(<type>, MaxPlus.Constants.ISkin)

And if that’s the case what value is <type> expecting?

If you look at the methods, you will see there’s only

 |  Methods inherited from InterfaceServer:
 |  
 |  GetInterface(self, *args)
 |      GetInterface(InterfaceServer self, Interface_ID id) -> BaseInterface

which is a bummer as this corresponds to the Animatable::GetInterface(id); and unlike the overriden method in C++, you can’t pass anything else than Interface_ID. There are quite a few dead-ends like this in the Python API.