I'm trying to find the available Properties Editor tabs of the active object. bpy.context.space_data.context
(when accessed inside the Properties Editor) indicates which tab is being displayed and can be used to set the active tab. To do this with code you should know ahead of time which tabs (panels, menus, etc.) are available for the active object (i.e. armature vs a mesh type). For instance if you set bpy.context.space_data.context = "cheese"
(while in the Properties Editor) with a mesh object active you get this error message:
TypeError: bpy_struct: item.attr = val: enum "cheese" not found in
('TOOL', 'RENDER', 'OUTPUT', 'VIEW_LAYER', 'SCENE', 'WORLD', 'OBJECT', 'MODIFIER',
'PARTICLES', 'PHYSICS', 'CONSTRAINT', 'DATA', 'MATERIAL', 'TEXTURE')
Are these values stored in the object context somewhere? Is there some other way I can access a list of available Property Editor tabs context for the active object, or will I have to map these out manually? space_properties.py doesn't seem to be much help here.