How to toggle visibible / selectable / renderable for multiple objects?
The outliner is written in C, and not much is exposed to Python.

The operator that toggles the (render-)visibility or selectability is:

bpy.ops.outliner.object_operation()


Possible arguments for the type parameter are:

('SELECT', 'DESELECT', 'SELECT_HIERARCHY', 'DELETE', 'TOGVIS', 'TOGSEL', 'TOGREN', 'RENAME')


As you see, there are only toggles. Someone had to add some to only turn on or only turn off all pre-selected items (would unify the settings). Seems like a simple C task, but not sure how to do the interaction with the user...

Wouldn't make much sense to clutter the right-click menu with


  Toggle Visible
  Make Visible
  Make Invisible
  Toggle Selectable
  Make Selectable
  Make Unselectable
  Toggle Renderable
  Make Renderable
  Make Unrenderable


Hotkeys should work well however, Shift + R/S/V to turn all on, Alt + R/S/V to turn all off. Ctrl + ... wouldn't work, 'cause CtrlS is globally for save .blend.



Update:

I duplicated the toggle code and changed it to set visibility/selectability/renderability. This means you can switch each of them on, just like you would toggle them. If you want to turn them all off, turn them all on, then toggle to invert. Benefit: 3 operators / entries in the right-click menu less.

It might make sense to refactor the code and have only one operator each (so 3 in total) + an enum to turn on, off or toggle. I would still add turn on and toggle to RMB menu only.

Diff: http://www.pasteall.org/49381/diff

Windows 64bit build: http://graphicall.org/1101