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?