However, for me, it is just selecting the root primitive and not the one specified.
I've tried two different methods, one based on the network and the other based on the viewer, but both work the same. Can anyone help me with that, please?
importhou#Get current networkviewer=hou.ui.paneTabOfType(hou.paneTabType.SceneViewer)network=hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor).pwd()#OPTION 1viewer.setCurrentSceneGraphSelection("/pig/geo")#OPTION 2network.setSelection("/pig/geo")
However, for me, it is just selecting the root primitive and not the one specified.
I've tried two different methods, one based on the network and the other based on the viewer, but both work the same. Can anyone help me with that, please?
importhou#Get current networkviewer=hou.ui.paneTabOfType(hou.paneTabType.SceneViewer)network=hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor).pwd()#OPTION 1viewer.setCurrentSceneGraphSelection("/pig/geo")#OPTION 2network.setSelection("/pig/geo")
Ok, I figured it out. For anyone who will find it useful.
The function expects a list. So it needs to be like this