MikeRhone Posted November 17, 2011 Share Posted November 17, 2011 Hey all. I'm trying to evolve a procedure I found here: . Basically, I want to be able to return a list of objects based on their name. I'm pretty new to OOP, but I know MEL well. Is this the standard way to select by name/type in Houdini through Python? My code: def printSearch(term): li =  for n in hou.node('/').allSubChildren(): if n.name().startswith(term): #print n.path() li.append(n.path) printSearch("Rock") print li Error: Traceback (most recent call last): File "tool_5", line 11, in <module> NameError: name 'li' is not defined Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.