Houdini 20.0 Python scripting hou hou.qt

hou.qt.skipClosingMenusForCurrentButtonPress HOM function

Disable automatic closing of menus for the current mouse button event.


Normally a mouse button event sent to any Qt widget in the Houdini process will cause all open Houdini menus to close. However if a mouse button event to a Qt widget is what causes a Houdini menu to open (such as through a call to hou.NetworkEditor.openNodeMenu), it is necessary to disable this automatic menu closing temporarily. Otherwise the menu that was just opened would be immediately closed. This method does exactly this, disabling the automatic menu closing until the next mouse button release event, at which time the automatic menu closing is re-enabled.