I tried scouring through the documentation and looked at the preset templates in the scripting workspace and I still can’t get my head around this stuff.
The main issue here is I don’t know what my options are in terms of UI creation because sometimes the script doesn’t seem to be doing anything. When it does you don’t know where it pops up. I can gather what some of them do but that was only after I searched through the software to find the output of the script.
My main interest is in the WorkSpaceTool type so I can get a button right on the left panel but the documentation doesn’t seem to help that much. The documentation really lacks visuals even though I assume the best way to know how UI works is by showing the visual output.
All this talk about ‘panels’, ‘menus’, ‘lists’ aren’t terribly helpful without visuals.
WorkSpaceTool is a class for the active workspace tool. If you’re looking to add a simple button to an existing panel, you need to look at the panel class.
The panel on the left side of the viewport is called VIEW3D_PT_tools_active and can be accessed in:
bpy.types.VIEW3D_PT_tools_active
Adding a button or two to this panel boils down to: