Last active
April 9, 2023 17:57
-
-
Save kickbase/d65d2d152e2e5c698c858b52160d4fc0 to your computer and use it in GitHub Desktop.
[Houdini] [Python] Turn the template flags off in current SOPnetwork.
This file contains 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 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
thanks man!