Skip to main content
Eske
Participant
Feb 22, 2022 3:16 AM UTC
Question

A User channel can not be accessed by python api

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

Léna Piquet Froyok
Adobe Employee
Adobe Employee
Mar 9, 2022 6:12 PM UTC

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

Translate
Participant
Mar 3, 2022 12:46 AM UTC

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

Translate