Skip to main content
Participant
Nov 4, 2022 11:02 PM UTC
Question

Scripting Question: post-launch python script?

Does Substance Designer have a post-launch python script it will run similar to maya's "usersetup.py" or unreal's "init_unreal.py" or houdini's "123.py"?

It appears Designer DOES execute "sitecustomize.py" post-launch, but I'd prefer not to clutter that up since we're using it for a lot of things at the moment.

Thanks in advance.

Jake H

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Participating Frequently
Nov 7, 2022 1:35 PM UTC

You can pass a path to a Python script to execute using the --startup-script argument. That is the closest thing we have to usersetup.py.

The Python API does not offer many things for customizing Designer. Customizing things like the list of user templates or user library content is normally done using config files. You can check here for the details of how this works: https://substance3d.adobe.com/documentation/sddoc/preferences-window-102400011.html

Translate
Participant
Nov 7, 2022 5:29 PM UTC

Thank you for the response. We were trying to figure out how to run some setup scripts without deploying a launcher batch file. In my experience, a lot of the artists tend to run Painter and Designer directly from the start menu, and tend to forget to run launcher scripts. I think instead we'll try something else.

Translate
Participating Frequently
Nov 8, 2022 10:31 AM UTC

I have some previous experience with these kind of issues on Unix. The solution there was usually not to install the apps in a place where the os would find them automatically and write some kind of launcher script / UI tool to launch the apps with the correct settings and dependencies for specific projects.

We used rez, https://github.com/AcademySoftwareFoundation/rez, to configure environments and handle dependencies.

I am not very experienced with Windows, I am not sure if a similar approach would work.

 

Est.

Translate
Participant
Nov 4, 2022 11:55 PM UTC

OOOF. On further review, "sitecustomize.py" appears to run every time you right-click a package in the explorer. This might be an issue..

Translate