Skip to main content
Participant
Apr 16, 2023 12:00 PM UTC
Answered

Run Scripts from Command Line

Hello everyone,

I have been using Adobe Substance 3D Sampler for a while now and I have been wondering if there is a way to write scripts for it from the command line and execute them. I have been searching for information on this topic but I have not found any clear answers yet.

I think that being able to write scripts from the command line would be very useful, especially for automating repetitive tasks or for batch processing multiple images. It would save a lot of time and effort in the long run.

Does anyone know if it is possible? If so, could you please post some ressources or tips? 🙂

Thank you in advance for your help!

This topic is closed to new replies. Start a new post to keep the conversation going.
Baptiste_Substance_3D
Baptiste_Substance_3DCorrect answer
Community Manager
Apr 17, 2023 1:39 PM UTC

Mac is always special.

You need open Adobe Substance 3D Sampler.app with "Show package content" to use the real .app

Here is the command:

/Applications/Adobe\ Substance\ 3D\ Sampler/Adobe\ Substance\ 3D\ Sampler.app/Contents/MacOS/Adobe\ Substance\ 3D\ Sampler --run-script

4 replies

Baptiste_Substance_3D
Community Manager
Community Manager
Apr 17, 2023 9:03 AM UTC

Hello,

 

You can develop scripts for Sampler to automate tasks or batch operations:

https://substance3d.adobe.com/documentation/sadoc/create-a-script-with-python-234455544.html

The Python API documentation is available directly from Sampler > Help > Python API documentation

 

From the command line, you can launch your script like this:

"C:\Program Files\Adobe\Adobe Substance 3D Sampler\Adobe Substance 3D Sampler.exe" --run-script <script.py>

 

Thanks

Translate
Participant
Apr 17, 2023 11:45 AM UTC

Hey,

 

thank you so much! Is there any way to do that on Mac too? I adjusted the path (currently in Applications) 

 

"Adobe\ Substance\ 3D\ Sampler/Adobe\ Substance\ 3D\ Sampler.app" --run-script random_seed_variations.py

 

but I still get an error message "command not found"...

 

Thanks in advance!

Translate
Baptiste_Substance_3D
Community Manager
Baptiste_Substance_3DCommunity ManagerCorrect answer
Community Manager
Apr 17, 2023 1:39 PM UTC

Mac is always special.

You need open Adobe Substance 3D Sampler.app with "Show package content" to use the real .app

Here is the command:

/Applications/Adobe\ Substance\ 3D\ Sampler/Adobe\ Substance\ 3D\ Sampler.app/Contents/MacOS/Adobe\ Substance\ 3D\ Sampler --run-script

Translate