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