MuteLayer Python LOP

   1409   0   0
User Avatar
Member
75 posts
Joined: July 2006
Offline
Hi,

I was trying to recreate the functionality of Configure Stage LOP using a Python LOP, primarily the muting function. My very basic test below returns 'True' which implies the layer is muted but it does not mute in the viewer/layer panel and Houdini also bombs when I change frame. I'm assuming I'm missing some kinda Solaris caching thing.


node = hou.pwd()
stage = node.editableStage()


stack = stage.GetLayerStack(includeSessionLayers = False)
pth = 'p:/mypath/mylayer.usda'

for lyr in stack:
    if 'mylayer' in lyr.identifier:
        print lyr.identifier
        stage.MuteLayer(pth)

print stage.IsLayerMuted(pth)

And I'm not using asset resolving for now. I was hoping to get wildcard functionality in the Configure Stage LOP 'mute paths' parm

Thanks,

J
john @ goodbyekansas
  • Quick Links