Jerry Kon

jerrykyj.kon

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Scene Graph Tree selection with Python Nov. 27, 2023, 5:03 p.m.

robp_sidefx
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.

Hi,How to get the current selected prims in Scenegraphtree pane, why dont Houdini pass the selected prims to kwargs of the callback funtion?

Mouse position in python state drag_and_drop Feb. 19, 2023, 4:02 p.m.

Hello guys
I was trying to get the prim where my mouse is on in the scene viewer in python drag and drop mode. Any hou api?

I was also trying to use the locateScenegraphPrim to find the prim, but cannot get the mouse position in drag and drop. There is no ui_event in kwargs for drag and drop, so how to get the mouse position?Seems the onMouseEvent can not be run in drag and drop mode.

Thank you!