def visibilitytoggle(o_ctrlr):
    """
    input blender logic:
        Mesh
        controller type='PYTHON' mode='MODULE'
        sensor type='KEYBOARD' name='VisibilityKey'

    description:
        togglel controller.owner object between visible and invisible
    """
    if o_ctrlr.sensors['SensVisibilityKey'].positive:
        for _ in o_ctrlr.sensors['SensVisibilityKey'].events:
            if o_ctrlr.owner.visible == True:
                o_ctrlr.owner.visible = False
                print('visibility : {} off'.format(o_ctrlr.sensors[
                    'SensVisibilityKey'].key))
            else:
                o_ctrlr.owner.visible = True
                print('visibility : {} on'.format(o_ctrlr.sensors[
                    'SensVisibilityKey'].key))
