Missing interfaces in 3ds Max SDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The MaxSDK is still missing some headers that need to be brought over from the MaxRestrictedSDK:
- IMultiOutputConsumer
- IMultipleOutputChannelsWithChannelValues
According to a discussion with Neil Hazzard a couple of years back, this falls through the cracks every year. Now that Max 2024 provides Compound and Material Output Selector nodes, surely it's now an appropriate time to include these important interfaces in the public SDK.
Another interface to please consider is the Shave SDK. This isn't in the MaxRestrictedSDK at all, and we have to request a new header/lib every time you upgrade compilers or build settings. So, that comprises:
- hairAPI.h
- shaveSDKTYPES.h
- hairAPI.lib
There's also a private interface that should be exposed somehow: MeshVelocity. I've seen it used in the Max source (mesh.cpp). Right now, only Autodesk built-ins can take advantage of the IVertexVelocity interface when building a Mesh. Any plugin that wants to support it must use the following hack:
// Define our own fake MeshVelocity class
struct FakeMeshVelocity : public IVertexVelocity {
MapID mapChannel; // -1 if no vertex channel
Mesh* ownerMesh; // pointer to the Mesh
// Ensure future versions test for changes
static_assert(MAX_VERSION_MAJOR <= 26, "Check this in every new release!");
};
// Use type punning to obtain a MeshVelocity instance. This is of course
// dangerous, and plugin developers should not be forced to resort to it.
auto meshVelocity = static_cast<FakeMeshVelocity*>(mesh->GetInterface(IVERTEX_VELOCITY_INTERFACE_ID));
if (meshVelocity) meshVelocity->mapChannel = 2; // or whatever
If you don't want to expose the class itself, at least consider adding a SetMapChannel method to IVertexVelocities.