Jump to content
CinnamonMetal

Set Parent node as current node

Recommended Posts

Hmm... Maybe I'm misunderstanding, but simply doing

>>> node = hou.node("/obj/geo1/file1")
>>> print node.isCurrent()
False
>>> node.setCurrent(on=True)
>>> node.isCurrent()
True
>>> parent = node.parent()
>>> parent.isCurrent()
False
>>> parent.setCurrent(on=True)
>>> parent.isCurrent()
True

Seem to work

Share this post


Link to post
Share on other sites

I have a variable set to hou.pwd(); I want to set the parent node as the active node rather then the current node ?

If the current node has a parent, set it to the parent ?

Share this post


Link to post
Share on other sites

Same Question. ^_^

paren = thisNode.parent()
if paren == 0:
   print("complete")
else:
    paren.setSelected(on,clear_all_selected=True)

Error 'on' is not defined ? This is for setting the node which is connected to the current node ?

Edited by CinnamonMetal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×