Skip to content

Instantly share code, notes, and snippets.

@digitaldosyanich
Forked from kickbase/off_templateflags.py
Last active April 9, 2023 09:26
Show Gist options
  • Save digitaldosyanich/f9673227398b04d1b2d581094bbd6336 to your computer and use it in GitHub Desktop.
Save digitaldosyanich/f9673227398b04d1b2d581094bbd6336 to your computer and use it in GitHub Desktop.
[Houdini] [Python] Turn the template flags off in current SOPnetwork.
import hou
def off_templateflags(current):
for child in current.children():
node = hou.node(child.path())
if "setTemplateFlag" in dir(node):
node.setTemplateFlag(False)
def main():
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
current_node = editor.pwd()
if current_node.childTypeCategory() == hou.sopNodeTypeCategory():
off_templateflags(current_node)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment