How to send code to the 3ds Max script listener

How to send code to the 3ds Max script listener

mustafapassahci
Contributor Contributor
1,911 Views
2 Replies
Message 1 of 3

How to send code to the 3ds Max script listener

mustafapassahci
Contributor
Contributor

I want to send code to the 3ds max script listener for it to run. I thought it could be done by socket programming, but the threading Python module doesn't work in 3ds max. Therefore, when I try to listen to the message received with "while true" without threading, the program freezes. What should I do?

0 Likes
Accepted solutions (1)
1,912 Views
2 Replies
Replies (2)
Message 2 of 3

istan
Advisor
Advisor

In MXS there exists an execute() function, which allows to run scripts. Also in C++ there's Interface->ExecuteStringScript()..

Message 3 of 3

drew_avis
Autodesk
Autodesk
Accepted solution

You could try the approach from this tutorial, which uses Qt for the server and ExecuteMAXScriptScript() to run the script.

https://area.autodesk.com/tutorials/using-qt-in-3ds-max-utility-plug-ins/

 

Hope that helps,

Drew



Drew Avis
Content Experience Designer