Skip to main content
Participant
November 4, 2022
Question

Scripting Question: post-launch python script?

  • November 4, 2022
  • 2 replies
  • 442 views

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 has been closed for replies.

2 replies

Participating Frequently
November 7, 2022

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

Participant
November 7, 2022

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.

Participating Frequently
November 8, 2022

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.

Participant
November 4, 2022

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