Skip to main content
wasims61556838
Participant
September 20, 2025
Question

Add API to Expand/Collapse Layer Groups in the Layer Stack

  • September 20, 2025
  • 2 replies
  • 127 views

Description:

Currently, the Substance 3D Painter JavaScript (and Python) APIs provide access to layer stack data such as creating, renaming, moving, hiding, and selecting layers and groups. However, there is no exposed function to control the UI expand/collapse state (the chevrons) of groups (folders) in the Layer Stack.

Steps to Reproduce Limitation:

  1. Open a project with multiple groups/folders in the Layer Stack.

  2. Use the JavaScript API (alg.layerstack, alg.texturesets, mapexport.documentStructure, etc.) to iterate and manipulate layers.

  3. Attempt to programmatically expand or collapse groups → no API is available to do this.

Why this is important:

  • In projects with many nested groups, manually expanding/collapsing them is time-consuming.

  • Plugin developers could create useful tools to quickly expand or collapse all groups within a selected texture set, helping artists manage complex stacks.

  • Improves usability and productivity by reducing repetitive manual UI interactions.

  • Similar to how APIs allow selecting nodes or toggling visibility, being able to control group expansion would make custom UI plugins more powerful.

Requested Feature:

Expose a function in the API such as:
alg.layerstack.setGroupExpanded(node, true/false);
or
layerstack.setExpanded(groupNode, expanded=True/False)

Benefit:

This small addition would allow plugin developers to build workflow enhancers (like “Expand all groups” or “Collapse all groups” buttons) and improve navigation in large projects.

2 replies

Jeff_Coatsworth
Community Expert
Community Expert
September 22, 2025

Yes, let's move you over to that forum.

Community Expert
September 22, 2025

Hi,

You probably wanted to post this info somewhere else.

This is the FrameMaker user to user forum and not anything about Substance.

Best regards, Winfried