# How to change the Tab order in the Tool Shelf?

**URL:** <https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616>\
**Category:** Basics & Interface\
**Created:** [August 12, 2014, 9:06am UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616 "2014-08-12T09:06:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![0rAngE](https://blenderartists.org/user_avatar/blenderartists.org/0range/32/3098_2.png) [@0rAngE](https://blenderartists.org/u/0rAngE)\
**Post date:** [August 12, 2014, 9:06am UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/1 "2014-08-12T09:06:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sanctuary](https://blenderartists.org/user_avatar/blenderartists.org/sanctuary/32/12611_2.png) [@Sanctuary](https://blenderartists.org/u/Sanctuary)\
**Post date:** [August 12, 2014, 10:43am UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/2 "2014-08-12T10:43:54Z")

</div>

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

space\_view3d\_toolbar.py , 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

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

```

Then select that whole class definition :

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

    @staticmethod
    def draw_add_mesh(layout, label=False):
        if label:
            layout.label(text="Primitives:")
        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.label(text="Special:")
        else:
            layout.separator()
        layout.operator("mesh.primitive_grid_add", text="Grid", icon='MESH_GRID')
        layout.operator("mesh.primitive_monkey_add", text="Monkey", icon='MESH_MONKEY')

    @staticmethod
    def draw_add_curve(layout, label=False):
        if label:
            layout.label(text="Bezier:")
        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.label(text="Nurbs:")
        else:
            layout.separator()
        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')

    @staticmethod
    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')

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

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

    @staticmethod
    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.label(text="Mesh:")
        self.draw_add_mesh(col)

        col = layout.column(align=True)
        col.label(text="Curve:")
        self.draw_add_curve(col)

        # not used here:
        # draw_add_surface
        # draw_add_mball

        col = layout.column(align=True)
        col.label(text="Lamp:")
        self.draw_add_lamp(col)

        col = layout.column(align=True)
        col.label(text="Other:")
        self.draw_add_other(col)

```

And move it -above- this one

```auto
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.translate")
        col.operator("transform.rotate")
        col.operator("transform.resize", text="Scale")

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

```

result :  
 ![http://i.imgur.com/oRHePo9.jpg](http://i.imgur.com/oRHePo9.jpg)

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 space\_view3d\_toolbar.py 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.

---

<div class="post-metadata">

**Author:** ![0rAngE](https://blenderartists.org/user_avatar/blenderartists.org/0range/32/3098_2.png) [@0rAngE](https://blenderartists.org/u/0rAngE)\
**Post date:** [August 12, 2014, 10:59am UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/3 "2014-08-12T10:59:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![heddheld](https://blenderartists.org/letter_avatar_proxy/v4/letter/h/ecb155/32.png) [@heddheld](https://blenderartists.org/u/heddheld)\
**Post date:** [August 12, 2014, 11:14am UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/4 "2014-08-12T11:14:26Z")

</div>

heck and I got gaffer tape on left of screen ☹  
but on the good side I learnt a lot more shortcuts 😉

---

<div class="post-metadata">

**Author:** ![0rAngE](https://blenderartists.org/user_avatar/blenderartists.org/0range/32/3098_2.png) [@0rAngE](https://blenderartists.org/u/0rAngE)\
**Post date:** [August 12, 2014, 12:06pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/5 "2014-08-12T12:06:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sanctuary](https://blenderartists.org/user_avatar/blenderartists.org/sanctuary/32/12611_2.png) [@Sanctuary](https://blenderartists.org/u/Sanctuary)\
**Post date:** [August 12, 2014, 1:10pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/6 "2014-08-12T13:10:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![0rAngE](https://blenderartists.org/user_avatar/blenderartists.org/0range/32/3098_2.png) [@0rAngE](https://blenderartists.org/u/0rAngE)\
**Post date:** [August 12, 2014, 2:48pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/7 "2014-08-12T14:48:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RickyBlender](https://blenderartists.org/user_avatar/blenderartists.org/rickyblender/32/7134_2.png) [@RickyBlender](https://blenderartists.org/u/RickyBlender)\
**Post date:** [August 12, 2014, 3:09pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/8 "2014-08-12T15:09:26Z")

</div>

might work  
did u try the prepend in operators ?

but not certain it can work with tab !

happy bl

---

<div class="post-metadata">

**Author:** ![DruBan](https://blenderartists.org/user_avatar/blenderartists.org/druban/32/23822_2.png) [@DruBan](https://blenderartists.org/u/DruBan)\
**Post date:** [August 12, 2014, 4:58pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/9 "2014-08-12T16:58:51Z")

</div>

> [@Sanctuary](#):
>
> 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.

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 _space\_view3d\_toolbar.py_ were entirely deleted the only difference would be - no toolbar in 3D view.

---

<div class="post-metadata">

**Author:** ![0rAngE](https://blenderartists.org/user_avatar/blenderartists.org/0range/32/3098_2.png) [@0rAngE](https://blenderartists.org/u/0rAngE)\
**Post date:** [August 12, 2014, 5:21pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/10 "2014-08-12T17:21:23Z")

</div>

> [@DruBan](#):
>
> 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 _space\_view3d\_toolbar.py_ 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.

---

<div class="post-metadata">

**Author:** ![RickyBlender](https://blenderartists.org/user_avatar/blenderartists.org/rickyblender/32/7134_2.png) [@RickyBlender](https://blenderartists.org/u/RickyBlender)\
**Post date:** [August 12, 2014, 6:29pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/11 "2014-08-12T18:29:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![playhard4545](https://blenderartists.org/letter_avatar_proxy/v4/letter/p/bbce88/32.png) [@playhard4545](https://blenderartists.org/u/playhard4545)\
**Post date:** [June 19, 2019, 12:55pm UTC](https://blenderartists.org/t/how-to-change-the-tab-order-in-the-tool-shelf/618616/12 "2019-06-19T12:55:52Z")

</div>

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)  
unregister\_class(cls)
