Skip to content

Instantly share code, notes, and snippets.

@tcrowson
Last active April 14, 2021 18:31
Show Gist options
  • Save tcrowson/8273554 to your computer and use it in GitHub Desktop.
Save tcrowson/8273554 to your computer and use it in GitHub Desktop.
For Softimage. Searches for 'Store_Color_In_Channel' nodes and adds their channels to the scene channel list.
# loop through shader nodes in the scene, identify 'store_color_in_channel' nodes,
# and add them to the scene globals. Avoid duplicate channnels.
for x in Application.FindObjects("", "{6495C5C1-FD18-474E-9703-AEA66631F7A7}" ):
if str(x.ProgID) == "Softimage.sib_color_storeinchannel.1.0":
chanName = Application.GetValue(x.Channel)
addChan = Application.CreateRenderChannel("%s"%(chanName), "siRenderChannelColorType", "")
newChan = (addChan[-1])
if newChan.isdigit():
Application.RemoveRenderChannel(addChan)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment