Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How to access the Link Contraint Interface?

How to access the Link Contraint Interface?

Anonymous
Not applicable
258 Views
1 Reply
Message 1 of 2

How to access the Link Contraint Interface?

Anonymous
Not applicable
Hi, how can I access the Link Constraint controller on a object?

I try using the ILinkCtrl class but with no success.
Here's what the documentation say about it:

This class represents the interface to the Link Controller.
You can obtain a pointer to the link controller interface using; GetLinkConstInterface(cd).
This macro will return:
(LinkConstTransform*)(CD)->GetFPInterface(LINK_CONSTRAINT_INTERFACE).


However, the class LinkConstTransform is not declared anywhere in the sdk. 😐
I however found it in "\maxsdk\samples\controllers\Link_cnstrnt.h".

Does anyone have a hint?
I'm using 3dsmax 2010 sdk.
0 Likes
259 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Ok I found it, my error was to try to call GetInterface on a INode* instead of a Control*.

ILinkCtrl* pILinkCtrl = (ILinkCtrl*)_pNode->GetTMController()->GetInterface(LINK_CONSTRAINT_INTERFACE)
0 Likes