Created
September 17, 2022 13:02
-
-
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)
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
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