Customize spacebar Toolbar menu?

I have the Toolbar assigned to my spacebar key - the Toolbar with the modeling and transform functions etc -

Can I customize this Toolbar menu? Add and remove functions/tools/actions etc -

If so how?

fyi - newb here so please explain to me like Im 5

Thank you.

1 Like

This is a difficult question even for an experienced blender user. I haven’t seen widespread use of custom menu bars. A quick search for an answer comes down to using non-standard scripts to create such menus. I’m not sure that such solutions will be acceptable now and compatible with future versions of Blender. Here is a similar description https://b3d.interplanety.org/en/creating-custom-tool-in-blender/. But perhaps not everything is so bad and there is a standard solution, about which I unfortunately cannot say anything.

Perhaps I wasn’t being clear - I am referring to the Tool menu that is an option on the Spacebar -

The documentation includes the following explanation: “The Quick Favorites menu gathers your favorite tools. Any tool or menu item can be added to this pop-up menu via its context menu.” That is, to add to favorites, you need to click on the required tool button and call up the contextual menu and execute “Add to Quick Favorites”. The item will be added to favorites, which can be viewed by calling the {Q} key.

https://docs.blender.org/manual/en/latest/interface/tool_system.html#quick-favorites

This isn’t the Quick favorites menu - this is the “Pop-Up Toolbar”

https://docs.blender.org/manual/en/latest/interface/tool_system.html#toolbar

And Im hoping to be able to customize it

I dont think you can customize it. You can make custom pie menus.

The tool bar menu has the same tools as the toolbar panel (t-panel T)… (see for example the 3D-viewport in object or edit mode or the UV-editor… ). The later (panel) can be changed to display on or two rows… or one row with text…

The already given reply is somekind of irritating (compatibility and bad ???) because the given link perfectly describes how to change the menu/panel… but it just doesn’t show (directly how to make an addon out of this…

(Some addons for example also add “buttons” to the toolbar…)

So the Quick-menu is also a proper hint…

Yes, you can customize the Toolbar menu in Blender, and it’s not as tricky as it might seem. Here’s a basic script to get you started:

import bpy
from bpy.utils.toolsystem import ToolDef
from bpy.types import WorkSpaceTool

class SimpleOperator(bpy.types.Operator):
    bl_idname = "object.simple_operator"
    bl_label = "Create Circle"
    bl_options = {'REGISTER', 'UNDO'}
    
    def execute(self, context):
        bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 0), scale=(1, 1, 1))
        return {'FINISHED'}


class SimpleTool(WorkSpaceTool):
    bl_space_type='VIEW_3D'
    bl_context_mode='OBJECT'
    bl_idname = "my_template.my_tool"
    bl_label = "Add Cube"
    bl_description = "This is a custom tool"
    bl_icon = "ops.mesh.primitive_cube_add_gizmo"
    bl_widget = None
    bl_keymap = (
        ("object.simple_operator", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
    )

    def draw_settings(context, layout, tool):
        layout.operator("object.simple_operator")

def register():
    bpy.utils.register_tool(SimpleTool, after={"builtin.scale_cage"}, separator=True, group=True)
    bpy.utils.register_class(SimpleOperator)

def unregister():
    bpy.utils.unregister_tool(SimpleTool)
    bpy.utils.unregister_class(SimpleOperator)


if __name__ == "__main__":
    register()

Copy and paste this script into Blender’s text editor and run it. This script defines a simple tool that adds a cube when you click in the 3D View. You can modify the execute method in the SimpleOperator class to perform any other action you want.

1 Like