Clear selection

   2409   1   1
User Avatar
Member
1 posts
Joined: Dec. 2006
Offline
How can I clear the node selection so when i create a playblast i do not have the selection brackets visible? I do not understand why i keep getting this error:

import hou
hou.Node.setSelected(True, clear_all_selected=True)

TypeError: unbound method setSelected() must be called with Node instance as first argument (got bool instance instead)

Additionally how can i set the selection mode to Box Selection using python.
User Avatar
Member
106 posts
Joined: June 2011
Offline
As the error says, you need to call the setSelected method with a node instance as first argument meaning

mynode = hou.node("/obj/mynode")
hou.Node.setSelected(mynode, True, clear_all_selected=True)

or

mynode.setSelected(True, clear_all_selected=True)

Hope it helps

Cheers
-J
  • Quick Links