Is it possible to get/set selection for the Scene Graph Tree in Python. I was looking at the docs and could not find anything.
https://www.sidefx.com/docs/houdini/hom/hou/SceneGraphTree.html [www.sidefx.com]
Scene Graph Tree selection with Python
4109 9 2-
- erikcarlson
- Member
- 25 posts
- Joined: Dec. 2015
- Offline
-
- mtucker
- Staff
- 4565 posts
- Joined: July 2005
- Offline
-
- erikcarlson
- Member
- 25 posts
- Joined: Dec. 2015
- Offline
-
- Zhuk Cmon
- Member
- 3 posts
- Joined: March 2015
- Offline
-
- mtucker
- Staff
- 4565 posts
- Joined: July 2005
- Offline
-
- Zhuk Cmon
- Member
- 3 posts
- Joined: March 2015
- Offline
-
- robp_sidefx
- Staff
- 593 posts
- Joined: June 2020
- Offline
Zhuk Cmon
Which event type that would be? I tried SelectionChanged but it's not firing up.
It should be that. If you paste this in the Python pane and then click in the scenegraph tree you should see messages appearing.
hou.node('/stage').addEventCallback([hou.nodeEventType.SelectionChanged,], lambda node, event_type: print('Selection changed!'))
This of course assumes the lopnet you want to watch is indeed
/stageand not, for example, /obj/lopnet1.
Edited by robp_sidefx - April 14, 2023 05:07:43
-
- Zhuk Cmon
- Member
- 3 posts
- Joined: March 2015
- Offline
-
- jerrykyj.kon
- Member
- 2 posts
- Joined: Oct. 2018
- Offline
robp_sidefxZhuk Cmon
Which event type that would be? I tried SelectionChanged but it's not firing up.
It should be that. If you paste this in the Python pane and then click in the scenegraph tree you should see messages appearing.hou.node('/stage').addEventCallback([hou.nodeEventType.SelectionChanged,], lambda node, event_type: print('Selection changed!'))
This of course assumes the lopnet you want to watch is indeed/stageand not, for example,/obj/lopnet1.
Hi,How to get the current selected prims in Scenegraphtree pane, why dont Houdini pass the selected prims to kwargs of the callback funtion?
Edited by jerrykyj.kon - Nov. 27, 2023 17:04:36
-
- mtucker
- Staff
- 4565 posts
- Joined: July 2005
- Offline
-
- Quick Links



