raincole
June 12, 2026 10:45:36
For example, I'd like to make Houdini to run some code when it enters KineFX state. But KineFX state is built-in, not written by me, and I'd not like to change Houdini's built-in Python code directly. Is it possible to hook my functions/scripts to an existing state so it's called upon entering that state?
mabelzile
June 16, 2026 20:29:59
You could install a callback on the hou.SceneViewer object where the state is running and listen for the hou.sceneViewerEvent.StateEntered event.
https://www.sidefx.com/docs/houdini21.0/hom/hou/SceneViewer.html#addEventCallback [
www.sidefx.com]
raincole
June 16, 2026 21:17:43
mabelzile
You could install a callback on the hou.SceneViewer object where the state is running and listen for the hou.sceneViewerEvent.StateEntered event.
https://www.sidefx.com/docs/houdini21.0/hom/hou/SceneViewer.html#addEventCallback [www.sidefx.com]
Thank you very much! Exactly what I need.