Skip to main content
Participant
May 15, 2025
Question

How to control brush settings (Alignment, Spacing Mode) via JavaScript API in Substance Painter

  • May 15, 2025
  • 1 reply
  • 177 views

Could you please provide guidance on the correct method to set the "Alignment" and "Spacing Mode" for the currently active brush using the JavaScript API (via substance_painter.js.evaluate() from a Python plugin) in Substance Painter [11.0.1]?

Specifically, I would like to know:

  1. The correct JavaScript path, starting from the alg object, to access the currently active brush (or tool) settings.

  2. The specific methods or property names to get and set the Alignment and Spacing Mode values from that object.

  3. The exact values (string, number, enum, etc.) that the API expects for "UV" alignment and "Texture" spacing mode.

    My goal is to create a Python plugin with a button that, when clicked, modifies the currently active brush settings as follows:

    Alignment: Change to "UV"

    Spacing Mode: Change to "Texture" (In the UI: Brush Properties > Brush Stroke > Spacing > Mode)

1 reply

Participating Frequently
June 26, 2025

came here to request this same general functionality

It would be nice if the Substance Painter API exposed brush settings to the python environment so some of the workflows can be better customized through scripting