Created
July 20, 2016 09:58
-
-
Save nicelifeBS/7d3dec2cb27f26cd1ce13db0190fceaa to your computer and use it in GitHub Desktop.
Selecting channels of an item in a render pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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