Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / SDK / How to access the Link Contraint Interface?
  RSS 2.0 ATOM  

How to access the Link Contraint Interface?
Rate this thread
 
33374
 
Permlink of this thread  
avatar
  • RenaudLL
  • Posted: 19 August 2009 06:58 AM
  • Total Posts: 5
  • Joined: 19 August 2009 09:44 AM

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 usingGetLinkConstInterface(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.



Replies: 0
avatar
  • RenaudLL
  • Posted: 20 August 2009 10:53 AM

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

ILinkCtrlpILinkCtrl (ILinkCtrl*)_pNode->GetTMController()->GetInterface(LINK_CONSTRAINT_INTERFACE)


Replies: 0