CinnamonMetal Posted October 9, 2017 Share Posted October 9, 2017 if thisNode.parent(): thisNode.setCurrent() How do I set the current node to the parent node; or must I use setSelected ? Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted October 9, 2017 Share Posted October 9, 2017 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 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 9, 2017 Author Share Posted October 9, 2017 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 ? Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted October 11, 2017 Share Posted October 11, 2017 @CinnamonMetal Please create a separate topic for all your Python questions, Thanks. Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 11, 2017 Author Share Posted October 11, 2017 (edited) 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 October 11, 2017 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.