How can I add custom section panel to the Texture Paint Properties?

I’m trying to add custom panel to the Texture Paint tools on the Properties tab, it’s suppoesd to be a simple task, but from some reason it’s doesn’t really work.
I think the problem is on the bl_context property, When I’m trying using it with other contexts like object it works, but not with the PAINT_TEXTURE.

Code:

class BM_MU_mask_textures_menu(bpy.types.Panel):
    bl_label = "My Texture Panel"
    bl_idname = "PT_SimpleTexturePanel"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "PAINT_TEXTURE"


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

That is not a Paint_Texture bar, its a tool bar. You need to add panel to the tool context and restrict it to only appear in Texture Paint mode

all right, Can you give me example how to do that? I tried to use the “tool” context but it’s show nothing anywhere.

bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_context = "objectmode"
bl_category = "Tool"

Add it to 3D Viewport panels and it will appear there as well. They’re shared.

2 Likes