Windows Args not working when configured in Shotgun Software Admin page

Hello,

I added the following Windows args in SG’s Software Admin page to launch 3ds Max 2020 via Shotgun Desktop:

Windows Path
C:\Program Files\Autodesk\3ds Max 2020\3dsmax.exe
Windows Args
-U MAXScript “C:\Temp\Startup.ms”

When I launch through SG desktop the Startup.ms script is not being executed.

The last entries I see in the MAXScript Listener is:
Shotgun: Resolving project…
Shotgun: Resolving configuration…
Shotgun: Updating configuration…
Shotgun: Starting up Toolkit…
Shotgun: Resolving context…
Shotgun: Launching Engine…
Shotgun: Engine launched.
Shotgun: Bootstrap successfully.

However, when I execute this command on the command line:
“C:\Program Files\Autodesk\3ds Max 2020\3dsmax.exe” -U MAXScript “C:\Temp\Startup.ms”

it works as advertised.

Is there something I need to configure when launching a DCC with arguments from Shotgun via Shotgun Desktop?

Thanks!!

3 Likes

Hi Cape

Welcome to the forums!!

I think I know whats going on here. I mocked up a test on my side and this is the command that will be run by SG Desktop when 3ds max is launched:

start /B "App" "E:\Autodesk\3ds Max 2018\3dsmax.exe" -U MAXScript “C:\temp\test_startup.ms” -U PythonHost "E:\sg\configs\windows_tk\install\app_store\tk-3dsmaxplus\v0.5.6\python\startup\bootstrap.py"

As you can see, there are now two -U arguments; the one that’s been added to the software entity and the one that Toolkit adds to allow the integration bootstrap code to run on startup.

So I suspect it is just running the last -U argument found in the command.
As Toolkit needs to provide it’s startup script, maybe there is a different way you can get it to run your startup script as well?
Looking at the documentation it seems you can use the PATH env var:

  1. The directories that are listed in the PATH environment variable

You could either set the PATH env var globally on each machine, or you could set it during the Toolkit Launch process:

https://developer.shotgunsoftware.com/624f2593/

2 Likes

Thanks for the information Philip. I’ll have another look at the SG toolkit. To behonest, I was just looking for a quick and easy (no dev work) way to distribute DCC configurations across multiple team members w/o them having to touch their OS configurations.

Thus far using SG toolkit to achieve this proved more challenging than expected.

2 Likes