Skip to main content
Eske
Participant
February 22, 2022
Question

A User channel can not be accessed by python api

  • February 22, 2022
  • 2 replies
  • 318 views

I want to make a user channel in a stack and edit it by Python API.

Making the user channel will succeed but I can't access it.

 

How do I access the user channels.

from substance_painter import textureset
ChannelType = textureset.ChannelType
ChannelFormat = textureset.ChannelFormat
for tex_set in textureset.all_texture_sets():
    for stack in tex_set.all_stacks():
        if not stack.has_channel(ChannelType.User14):
            stack.add_channel(*channel_param)
        print(stack.all_channels())
# [Python] There is no channel 'user14' in the texture set.

 

This topic has been closed for replies.

2 replies

Léna Piquet Froyok
Adobe Employee
Adobe Employee
March 9, 2022

Thank you for the report, we are going to look into this issue.

Participant
March 3, 2022

Hi, I've got the same issue !
substance_painter.textureset.ChannelType() is not able to find any the user channels above user7, but also CoatColor, CoatRoughness etc. Basically none of the "recently added" channels.

Creating a channel (for example user9) is working though. But impossible to get it.
All the old channels like BaseColor, Height etc as well as user0-7 are still working fine.

https://community.adobe.com/t5/substance-3d-painter-discussions/bug-python-api-quot-get-channel-quot-not-working-for-user-channel-above-7/m-p/12788125#M2377