Hiding Entire Panels and Other Elements from the UI

I'd like to hide the vast majority of the user interface. The users of my addon are biologists who are often quite intimidated by computers, so I'd like to limit the confusion on the screen to just the outliner, the panel of my custom addon, and the 3D view with no overlays, if possible.

How can I access the panels and other interface objects from python, in order to hide them from view? It's probably fine to just consider the layout workspace.

• You could customise the Layout workspace (even delete the other ones) by merging the different views until you only have the outliner and your addon left, also hide menus and headers, and save the file. Then makes the users open Blender by double-clicking the file. Just an idea. Feb 26 at 16:39
• Thanks wilks. I'm having trouble finding documentation on how to customize the Layout workspace, could you provide any tips or a link to an example? Feb 26 at 16:49
• You get a little crosshair in the views corners, pulling in splits and pulling out merges (when the adjacent view has the same size). About half way through this guy shows merging youtube.com/watch?v=HSm-cq7zd2s Feb 26 at 16:52
• I mean, how to do it from python... Feb 26 at 16:56
• Right, gee, not a clue. That's what I meant by having them open Blender through a file. But maybe you could do it manually, save a user preference file and load that with python? I don't know how you would go about doing that tho :) Feb 26 at 17:05

"Whack" em all.

Script will "whack" (unregister) any registered Panel, Menu or Header class that follows the naming convention.

import bpy

classes_to_whack = (
getattr(bpy.types, p)
for p in dir(bpy.types)
if any(
sep in p
for sep in ("_PT_", "_HT_", "_MT_")
)
)

for cls in classes_to_whack:
bpy.utils.unregister_class(cls)


More sensible approach here Unregistering panels in python

• Very helpful, thanks batFINGER. Feb 26 at 17:14
• Just a tad overkill. Cobbling together a panel beater addon that (among other functionality) makes all panels in a tab the children of one by Unrego,-> set parent -> then re-register. Both "cleans up" the interface, without totally removing. (for the rare biologist that can handle tech). Could prob be marked a dupe of link added.? Feb 26 at 17:23
• I spent quite a long time today googling, and never arrived at the link attached, because I didn't realizing that "unregistering" was the thing to do, so wasn't including that keyword in my searches. It's a duplicate, but with perhaps more general searchable keywords? Feb 26 at 17:27
• Ditto , is often difficult finding the "jargon" that is the key that unlocks finding the answers. Feb 27 at 7:35