Houdini 20.5 Python scripting hou hou.qt

hou.qt.unregisterKeyResolveInfoCallback HOM function

Unregisters a previously registered Python callback that Houdini will call for the given widget when building the key resolve info against which key events are resolved.

unregisterKeyResolveInfoCallback(widget)

widget

The widget for which to unregister the callback.

Raises hou.OperationFailed if the widget has no callback registered.

The following example shows to set up the callback for a widget subclass:

class MyWidget(QtWidgets.QWidget):
    def __init__(self):
        super().__init__()
        hou.qt.registerKeyResolveInfoCallback(self, self.key_resolve_info_callback)
    def __del__(self):
        hou.qt.unregisterKeyResolveInfoCallback(self)
        super().__del__()
    def key_resolve_info_callback(self, **kwargs):
        return {'contexts':['foo', 'bar']}

See also hou.qt.registerKeyResolveInfoCallback() and hou.qt.resolveKeyEvent().

hou.qt