How to change the Tab order in the Tool Shelf?

Trying to arrange everything the way it fits me, and the order of Tabs in the Tool Shelf is just not working for me.
Is there a way to change the order of those tabs?

I wish there was an user friendly way to drag and drop or change tabs order but unfortunately it wasn’t done like this and apparently it wasn’t planned as the devs mentionned about the tabs “they’re done” , so we can only hope one day someone with more user friendly ideas will come to help.

In the current version, the only way i’m aware to change the order of the tabs is to edit the file named , located in \yourblenderdirectory\2.71\scripts\startup\bl_ui\

select whole sections of classes related to a tab and move them above another whole section of classes defining another tab

By example, you want to move the Create tab above of the Tools tab in Object Mode , so you’ll look for

# ********** default tools for object-mode ****************

Then select that whole class definition :

class VIEW3D_PT_tools_add_object(View3DPanel, Panel):
    bl_category = "Create"
    bl_context = "objectmode"
    bl_label = "Add Primitive"

    def draw_add_mesh(layout, label=False):
        if label:
        layout.operator("mesh.primitive_plane_add", text="Plane", icon='MESH_PLANE')
        layout.operator("mesh.primitive_cube_add", text="Cube", icon='MESH_CUBE')
        layout.operator("mesh.primitive_circle_add", text="Circle", icon='MESH_CIRCLE')
        layout.operator("mesh.primitive_uv_sphere_add", text="UV Sphere", icon='MESH_UVSPHERE')
        layout.operator("mesh.primitive_ico_sphere_add", text="Ico Sphere", icon='MESH_ICOSPHERE')
        layout.operator("mesh.primitive_cylinder_add", text="Cylinder", icon='MESH_CYLINDER')
        layout.operator("mesh.primitive_cone_add", text="Cone", icon='MESH_CONE')
        layout.operator("mesh.primitive_torus_add", text="Torus", icon='MESH_TORUS')

        if label:
        layout.operator("mesh.primitive_grid_add", text="Grid", icon='MESH_GRID')
        layout.operator("mesh.primitive_monkey_add", text="Monkey", icon='MESH_MONKEY')

    def draw_add_curve(layout, label=False):
        if label:
        layout.operator("curve.primitive_bezier_curve_add", text="Bezier", icon='CURVE_BEZCURVE')
        layout.operator("curve.primitive_bezier_circle_add", text="Circle", icon='CURVE_BEZCIRCLE')

        if label:
        layout.operator("curve.primitive_nurbs_curve_add", text="Nurbs Curve", icon='CURVE_NCURVE')
        layout.operator("curve.primitive_nurbs_circle_add", text="Nurbs Circle", icon='CURVE_NCIRCLE')
        layout.operator("curve.primitive_nurbs_path_add", text="Path", icon='CURVE_PATH')

    def draw_add_surface(layout):
        layout.operator("surface.primitive_nurbs_surface_curve_add", text="Nurbs Curve", icon='SURFACE_NCURVE')
        layout.operator("surface.primitive_nurbs_surface_circle_add", text="Nurbs Circle", icon='SURFACE_NCIRCLE')
        layout.operator("surface.primitive_nurbs_surface_surface_add", text="Nurbs Surface", icon='SURFACE_NSURFACE')
        layout.operator("surface.primitive_nurbs_surface_cylinder_add", text="Nurbs Cylinder", icon='SURFACE_NCYLINDER')
        layout.operator("surface.primitive_nurbs_surface_sphere_add", text="Nurbs Sphere", icon='SURFACE_NSPHERE')
        layout.operator("surface.primitive_nurbs_surface_torus_add", text="Nurbs Torus", icon='SURFACE_NTORUS')

    def draw_add_mball(layout):
        layout.operator_enum("object.metaball_add", "type")

    def draw_add_lamp(layout):
        layout.operator_enum("object.lamp_add", "type")

    def draw_add_other(layout):
        layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
        layout.operator("object.armature_add", text="Armature", icon='OUTLINER_OB_ARMATURE')
        layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
        layout.operator("object.empty_add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'PLAIN_AXES'
        layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')
        layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')

    def draw(self, context):
        layout = self.layout

        col = layout.column(align=True)

        col = layout.column(align=True)

        # not used here:
        # draw_add_surface
        # draw_add_mball

        col = layout.column(align=True)

        col = layout.column(align=True)

And move it -above- this one

class VIEW3D_PT_tools_transform(View3DPanel, Panel):
    bl_category = "Tools"
    bl_context = "objectmode"
    bl_label = "Transform"

    def draw(self, context):
        layout = self.layout

        col = layout.column(align=True)
        col.operator("transform.resize", text="Scale")

        col = layout.column(align=True)
        col.operator("transform.mirror", text="Mirror")

result :

Of course, you will probably not want the Create tab above the Tools one, i don’t want this either, and just used this as an example.

Important things to know for locating the entries you need to move around is
bl_category -> Name of the tab
bl_context -> Object mode, Edit Mode etc…
bl_label = -> the Panel name inside of the tab

So yes, it’s a pain because it’s very easy to move something that shouldn’t be moved and screw up the interface, so be sure to make a backup of the file before any attempt as you’ll probably have to go through some trial&error to get exactly the result you want.

Something to know is that deleting whole sections related to a single tabs may remove it from the UI, so if there’s a tab containing entries completely useless to your work in Blender, that could be interestign.

Thanks for the help Sanctuary, much appreciated!
I can finally get some order in there.

I was hoping there was a key combo (I wasn’t aware as I have custom key navigation and selection) that will allow me to just drag-sort them.
I guess this is gonna be just another thing that’ll make my frequent buildbot usage even more tedious.

Too bad, I’ll refrain from bitching.

heck and I got gaffer tape on left of screen :frowning:
but on the good side I learnt a lot more shortcuts :wink:

Sanctuary, this approach does not help with custom Tabs that are manually created for sorting the addons right?
None of these Tabs are present in that py file, they are defined in their own py files.

Unfortunately how Blender decide which addons that has its own custom tab get ordering priority over another addon own custom tab, i have no idea.

1 Like

Any of the developers want to chime in and help out?

Basically, what I want to do is have some of the addon (custom) Tabs, be on the very top just under the Tools Tab.

1 Like

might work
did u try the prepend in operators ?

but not certain it can work with tab !

happy bl

Ha Sanctuary, that seems like it would make sense and it did to me too but quite bizarrely they have coded the add menu to be dependent on the toolbar instead of the other way around!!! So you cannot actually delete the create tab because then your add menu is empty! Frankly that’s quite strange - I would really have done it so if were entirely deleted the only difference would be - no toolbar in 3D view.

Yeah, I found that as well following Sanctuary’s guides.
Removing the Create Tab in that way actually removed the Add menu from the File Menu, and also from the Shift+A.
Odd way of doing it.

There’s gotta be a way arround it, but man is it convoluted.

Still strugling with this, anyone that was able to reorder custom Tabs from addons, help is appreciated.

did u try what Sanctuary said ?
it should work !

but make backup copy
and need to copy it when you change of version or build !

happy bl

you can remove unwanted tabs by unregistering the class

import bpy
from bpy.utils import unregister_class

gpclasses = [c for c in dir(bpy.types)
if c.startswith(“VIEW3D_PT_tools_rigid_body”)
or c.startswith(“VIEW3D_PT_tools_animation”)
or c.startswith(“VIEW3D_PT_tools_grease_pencil”)
or c.startswith(“VIEW3D_PT_tools_relations”)]

for c in gpclasses:
cls = getattr(bpy.types, c)