문제

I want to control 3ds max from a command-line. The problem is that every time I run it through cmd it opens a new instance. Is there any possibility to manipulate working instance of the program through the command-line?

도움이 되었습니까?

해결책

renato, Johan hello.

Does it have to be Python? If you were to do this via a dotnet, it would be a simple matter of referencing managedservices.dll and calling the executeIntMaxscriptQuery function.

In maxscript it would be like this but it would be not much different in C#

(dotnetclass "managedservices.maxscriptSDK").ExecuteIntMaxscriptQuery "HardWareLockID"

Im just finding my feet with Python, but if you were using Iron Python you would be able to use the managedservices.dll too if i'm not mistaken.

다른 팁

There's no easy (build-in) way to achieve this, but it's possible through COM or even a dotnet socket server. The idea is to build a bridge and sent maxscript commands. Backburner achieves this to start max in a special server mode and make it listen to the server through a pipe, but there's no documentation if this could be leveraged for custom solutions. What are you trying too achieve?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top