• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

BUG : Python API "get_channel()" not working for user channel above 7

New Here ,
Mar 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

Hi,

It seems that get_channel() is not working for any user channel above user7 (user8-15). As well as none of the "recently added" channels (like CoatColor, CoatRoughness, CoatOpacity, SheenColor, etc).
It works fine for all the other "old" channels (like BaseColor, Height, user0-7).

using Adobe 3D Painter 7.4.1

EXAMPLE :

I manually created user12 and user4 channel.

This not working (User12)

import substance_painter.textureset
substance_painter.textureset.Stack.from_name("DefaultMaterial").get_channel(eval("substance_painter.textureset.ChannelType.User12"))

##RESULT
ValueError: There is no channel 'user12' in the texture set 'DefaultMaterial'.

At:
  C:/Program Files/Adobe/Adobe Substance 3D Painter/resources/python/modules\substance_painter\textureset.py(688): get_channel
  <string>(2): <module>

This is working (User4)

import substance_painter.textureset
substance_painter.textureset.Stack.from_name("DefaultMaterial").get_channel(eval("substance_painter.textureset.ChannelType.User4"))

##RESULT
Channel(channel_id=51)


But EVAL is working

eval("substance_painter.textureset.ChannelType.User12")

As well as add_channel()

Only get_channel() is not working and only for the "new" channels.

Also reported here:
https://community.adobe.com/t5/substance-3d-painter-discussions/a-user-channel-can-not-be-accessed-b... 

Thank you,
Timothee Maron

TOPICS
Bugs & Crashes , Scripting

Views

106

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources