Skip to main content
brooks_0502
Participant
February 24, 2026

Python API GroupLayerNode get_geometry_mask_enabled_meshes() method returns error first time after opening a scene

  • February 24, 2026
  • 0 replies
  • 17 views

# note that this bug only happens after you first open the scene

# if you perform operations that modify the file during the same session, the error does not reoccur

# oddly, this seems to happen with large numbers of meshes with only some of them being enabled

# my test scene had 9 meshes, and if I enabled anything less than 4 of those 9 meshes in the

# geometry mask on the group layer, it generated a ‘vector too long’ error
import substance_painter as sp
current_stack = sp.textureset.get_active_stack()

selected_layers = sp.layerstack.get_selected_nodes(current_stack)

for layer in selected_layers:

    if layer.get_type() == sp.layerstack.NodeType.GroupLayer:

        enabled_mesh_names = layer.get_geometry_mask_enabled_meshes()