-
-
Save digitaldosyanich/f9673227398b04d1b2d581094bbd6336 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
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