Skip to content

Instantly share code, notes, and snippets.

View digitaldosyanich's full-sized avatar
🙃

Gosha Dos digitaldosyanich

🙃
View GitHub Profile
@digitaldosyanich
digitaldosyanich / swap-flags.py
Last active April 9, 2023 09:43
[Houdini] [Python] Swap the Template and Display flags on two differen nodes in current SOP
#created/tested for H.19.5 py3.7
import hou
def swap_flags():
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
current_node = editor.pwd()
if current_node and current_node.childTypeCategory() == hou.sopNodeTypeCategory():
display_node = None
template_node = None
@digitaldosyanich
digitaldosyanich / off_templateflags.py
Last active April 9, 2023 09:26 — forked from kickbase/off_templateflags.py
[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():