In my plugin I have an operator that needs to iterate through potentially 100's of objects that might be 'hidden in viewport' or 'disabled in viewport' and perform some operations that require the object to be visible in viewport. Afterwards I want to restore whatever visibility the object had, so I need to both get and set these options.
When I hover over the icons, both show the parameter
bpy.context.object.hide_viewport. Obviously they can't both be the same parameter as they both do different things. How do I get and set 'hidden in viewport' and how do I get and set 'disabled in viewport' using the Python API?
Edit: I can see that both ObjectBase(bpy_struct) and Object(ID) have the
hide_viewport property, however ObjectBase is documented as 'Temporarily hide in viewport' and Object is documented as 'Globally disable in viewports'. How do I access an Object's ObjectBase?