Skip to content

Instantly share code, notes, and snippets.

@nicelifeBS
Created July 20, 2016 09:58
Show Gist options
  • Save nicelifeBS/7d3dec2cb27f26cd1ce13db0190fceaa to your computer and use it in GitHub Desktop.
Save nicelifeBS/7d3dec2cb27f26cd1ce13db0190fceaa to your computer and use it in GitHub Desktop.
Selecting channels of an item in a render pass
import modo
import lx
scene = modo.scene.current()
selected = scene.selected[0]
list = []
rp = scene.renderPassGroups[0]
for ch in rp.groupChannels:
g=ch.item.itemGraph('xfrmCore')
try:
_item = g.forward(0)
except:
_item = ch.item
if selected == _item:
print _item, ch
list.append(ch)
lx.eval('select.drop item')
lx.eval('select.drop channel')
for ch in list:
lx.eval('select.channel {%s:%s} add' % (ch.item.id, ch.name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment