[Sidefx-houdini-list] Mouse clicks

Andy Nicholas andy at andynicholas.com
Mon Nov 23 11:24:20 EST 2015

Hi List,
Does anyone know if there's a way to create simple mouse/viewport 
interactions for a digital asset (or otherwise)?

For example, I would want the user to be able to click in the viewport, 
and have a callback run which could give me the screen position of the 
click. I figure I could work out a way of getting the 3D position in the 
scene using both hou.GeometryViewport.mapFromMouseChop() and 
hou.GeometryViewport.queryPrimAtPixel() to see what was hit.

So far, all I've really seen that comes close is the Paint SOP's 
functionality and possibly the Mouse CHOP. It all feels a little hacky 
to use these, so I was wondering if there's a better alternative? Or is 
this just HDK territory?


More information about the Sidefx-houdini-list mailing list