This is a substance painter python plugin for automatically exporting active texture set when .spp file is saved.
Built for Substance Painter v11.0.1. The plugin has not been tested for other version yet.
- In substance painter application, find menu
Pythonand selectPlugins Folder:
- Open the subfolder
plugins:
- Download the file
export_on_save.pyin this repository into the folderplugins:

- In substance painter application, click
Python - Reload Plugins Folder
- There should be
export_on_savein thePythonmenu. Check it, and there should be a new menuExport on Save:
- Installation completed.
The plugin will use current export settings during exporting.
So, at first:
- Open
Export texturesdialog underFilemenu:
- Fill the
Global settings:
- Click
Save Settingsat the bottom of theExport texturesdialog
Then just check Enable Auto Export on Save under the menu Export on Save:

The plugin will export the active texture set when the project is saved, using the glboal export settings filled in Export textures dialog.
Check the log by Window - Views - log:

- Project is locked during the
PostSavedevent- Substance painter hide a python api
_substance_painter.project.do_action(_substance_painter.project.Action.Unlock)for project locking/unlocking
- Substance painter hide a python api
- Python API cannot access current export options
- Javascript API can
- Check the document by
Help - Scripting Documentation - Javascript APIin substance painter application
- Javascript API
alg.settingsis undefined- So
export_on_save_settings.jsonstored in the same directory with the plugin python file is used instead
- So
- There is always a warning about deprecated method
_utility.make_callable- It is called by
TextureSet.name()which is a sustance painter python API internal method - As a walkaround, just use the hidden python API
_substance_painter.textureset.material_name
- It is called by
- So many hidden API, substance painter's plugin api seems to be a shit
- YES, F**K AD@BE
