How to author layer mutes with a python LOP

   312   1   1
User Avatar
Member
20 posts
Joined: 3月 2020
Offline
Heyja,

for some of our inhouse tools we are authoring layer mutes but always have to do those with a configure stage LOP with a python expression attached to it essentially running python twice. I tried stage.MuteLayer() before but that doesn't seem to gel with stage evaluation as the layer just stays muted even before the python LOP. Is there a way to do this within a python LOP?

cheers,
Florens
User Avatar
スタッフ
4444 posts
Joined: 7月 2005
Offline
No, it is not currently legal to mute layers in a python LOP.

If the python is expensive, you can run it once in a python LOP, and attach the result to the HoudiniLayerInfo prim as metadata or an attribute. Then in the Configure Stage LOP you can read the value from the stage with some fairly simple python code.
  • Quick Links