Missing interfaces in 3ds Max SDK

Missing interfaces in 3ds Max SDK

geoff
Contributor Contributor
512 Views
3 Replies
Message 1 of 4

Missing interfaces in 3ds Max SDK

geoff
Contributor
Contributor

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.

0 Likes
513 Views
3 Replies
Replies (3)
Message 2 of 4

istan
Advisor
Advisor

I'd put a request on the beta board. But there are not many active SDK developers there anymore..

0 Likes
Message 3 of 4

geoff
Contributor
Contributor

Good point. I've re-posted over there. In the past I would just submit a ticket to ADN but have been unable to access that system after an account migration. 😞

0 Likes
Message 4 of 4

istan
Advisor
Advisor

@geoff wrote:

Good point. I've re-posted over there. In the past I would just submit a ticket to ADN but have been unable to access that system after an account migration. 😞


Forget ADN - this "channel" is dead. Even AD suggests to ask SDK questions only on the Beta board. But there are not many active SDK developers left.

0 Likes