top of page

Code snippet: Set display flags for nodes matching name

Ellie Ansell

Simple snippet for setting display flags.



value = hou.pwd().parm("value").eval()

def setExportFlags(value):
    '''
    Sets export flags of all nodes in chopnet selected.
    '''
    node = hou.selectedNodes()
    nodes = [n for n in node if "chopnet" in n.type().name()]
    for i, n in enumerate(nodes):
        nodes = n.children()
        children = [n for n in nodes if "export" in n.type().name()]
        for c in children:
            print "Set export flag of {0} to {1}".format(c, value)
            c.setExportFlag(value)

setExportFlags(value)
        

17 views0 comments

Recent Posts

See All

Komentarji


  • LinkedIn // Professional Bio
  • Facebook // ellieansellart page
  • Instagram // Informal fun
  • Vimeo

© 2020 by Ellie Ansell

Happily created using Wix.com

bottom of page