• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Auto-load shelf/assets with an environment variable/startup script?

Community Beginner ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

I have a custom assets folder that includes all the typical things (alphas, templates, materials, colorluts, etc). Is there a way to distribute this to people without them having to manually add the library path in the settings?

 

I could've sworn I've done this before successfully by placing the asset folder in a folder called "shelves" at the one of the SUBSTANCE_PAINTER_PLUGINS_PATH locations, but that doesn't seem to work anymore.

 

I also have a startup script if it's possible to load it through python, I just don't see anything in the API that mentions it.

TOPICS
Discussion , Scripting

Views

75

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 25, 2023 Jun 25, 2023

Copy link to clipboard

Copied

LATEST

Here is the solution I found:

import substance_painter.resource as spr

spr.Shelves.add(
    'my_custom_shelf',
    '/path/to/my/shelf'
)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources