Skip to content

Instantly share code, notes, and snippets.

@Regnareb
Created September 17, 2022 13:02
Show Gist options
  • Save Regnareb/aa1a5d04e9dbf0754d6b69c22ca2c9fd to your computer and use it in GitHub Desktop.
Save Regnareb/aa1a5d04e9dbf0754d6b69c22ca2c9fd to your computer and use it in GitHub Desktop.
Put that file in your Houdini preference folder to automatically make the display/render flag follow your new connections (houdiniXX.X\scripts\onInputChanged.py)
def automatic_display_flag(node, index):
"""When connecting input, this script will change the display flag is the input connected has the display flag on"""
try:
if node.input(index):
if node.input(index).isDisplayFlagSet():
node.setDisplayFlag(True)
if node.input(index).isRenderFlagSet():
node.setRenderFlag(True)
except Exception:
pass
automatic_display_flag(kwargs["node"], kwargs["input_index"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment