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.
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 recognisebl_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. $\endgroup$