Notifications
Clear all

[Closed] Call maxscript function from SDK

Hi,

Would that be possible?
A function developed in maxscript that can be called from within an SDK plugin?

The functions are loaded at max startup.

Thanks,
Davy

3 Replies
1 Reply
(@leeriver)
Joined: 11 months ago

Posts: 0
  1. use CreateInstance() create GPU instance

  2. call function, gp->ExecuteFileScript(tchFileName);

    virtual GUPExport bool GUP::ExecuteFileScript   (  TCHAR *  [i]file[/i]   )  [virtual]         
    

Remarks: Implemented by the System.

This method will execute the specified MAXScript file. Parameters: MCHAR *file

The file name for the script file. Returns: TRUE indicates if the script was successfully sent to MAXScript; FALSE if it was not sent. Note that this does not reflect the result of the script.

I think yes,

Lonerobot posted an interesting article about that on his website : http://lonerobot.net/?p=472

The idea is to use ManagedServices to communicate with 3dsmax.
then you use for example :
ManagedServices.MaxscriptSDK.ExecuteFloatMaxscriptQuery(“your maxscript function”);

this will return you a float value that you can use in the SDK.
of course there are other types MaxscriptQuery.

…interesting, gonna investigate.

Thanks!