# Changing the location of panels in different categories in the Toolshelf (script needed)

I need to relocate some panels from the toolshelf in other categories.

I noticed that the BSurfaces addon has a preference field that allows to relocate where it's panel is placed in the toolshelf simply by changing the string in that preference field. When activated, it is placed in Toolshelf region > Tools category (but only in Edit mode). I would like to put it in a "Retopology" category (tab), so that's what I type in.

Based on that feature, I would like to have a template script that I can activate as an addon that allows me to do the same but for the other panels so I can rearrange my interface and regroup similar panels to better suit my workflow.

For example, let's say I wanted the panel "Rigid Body Tools" from the "Physics" category in the Toolshelf to be relocated in a new category named "Custom" (still in the Toolshelf).

PS: I want to define the relocation of the panel directly from this addon, without messing with the code of the official release.

I suppose the way to do it is to change the "bl_context = " of the panel I wish to relocate but I don't know how to access it.

Can somebody write me such a script?

Thank you.

• A panels bl_category defines it's tab name, you would need to edit each addon file to control the tab names used. Blender doesn't seem to recognise bl_category changes after the panel is registered. bsurfaces does it by having a function that unregisters, changes the category then re-registers it's panels. – sambler Dec 1 '16 at 8:22
• But isn't it possible to access that "bl_category" variable from a different script? It's ok if the function unregisters, changes the category, then registers. It's just that I don't know how to write that... Also I would like to avoid having to go in each file. I could easily do that, but it would cause me management problems as the Blender versions evolve... – Chris Dec 1 '16 at 18:21