Can I add this elements to my panel

Hello
I have simple question, but for better understanding it will be better when I show my problem using screenshoots
Is it possible to move these elements?


to my Panel, for example here:
image
I know that in python i can add Radius Strenght to my custom brush.
I would like the user to see here what the values ​​are and whether dyntopo is checked or not.
I will be grateful for your help.
Greets

import bpy


class BrushPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Brush Panel"
    bl_idname = "OBJECT_PT_brush"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Tools"

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

        obj = context.object
        scn = context.scene        
        tool = scn.tool_settings
        unified = tool.unified_paint_settings
        brush = bpy.data.brushes['Smooth']
        
        useDyntopo = ''
        brushRadius = ''

        # Dynotopo enabled                
        if obj.use_dynamic_topology_sculpting:
            useDyntopo = "Dyntopo: Enabled"
        # Dynotopo disabled            
        else:
            useDyntopo = "Dyntopo: Disabled"        

        # Unified brush radius
        if unified.use_unified_size:
            brushRadius = ("Radius: " + str(unified.size))
        # Brush radius            
        else:
            brushRadius = ("Radius: " + str(brush.size))
                    
        row = layout.row()
        row.operator("wm.tool_set_by_id", text=("[1]Smooth brush" + " | " + brushRadius + " | " + useDyntopo), icon='BRUSH_SMOOTH').name = "builtin_brush.Smooth"
        
            
def register():
    bpy.utils.register_class(BrushPanel)


def unregister():
    bpy.utils.unregister_class(BrushPanel)


if __name__ == "__main__":
    register()

Most of the times is a good idea to right lick the menu items and then choose “edit source”, that way you can reference the real python code and copy the properties and operators needed to your own panel.

Hello
Wooow It’s working.
But I have one problem, with number of places, after coma.
image
Maybe You have idea, how to change it ?
Thank You very much, for your solution, It’s great.
Thank You a lot :slight_smile:

And one more think :slight_smile:
I have such a think

    def draw(self, context):

        layout = self.layout
        scene = context.scene              
        tool = scene.tool_settings   
        unifiedsmooth01 = tool.unified_paint_settings
        unified_smooth = tool.unified_paint_settings        
        unifiedgrab01 = tool.unified_paint_settings                   
        brushsmooth = bpy.data.brushes['Smooth']  
        brushgrab = bpy.data.brushes['Grab']                       

        wm = context.window_manager
        obj = context.object
        scn = context.scene           
        useDyntopo = ''
      
        useDyntopo = ''
        brushSmoothStrength = ''         
        brushSmoothRadius = ''  
        brushGrabStrength = ''              
        brushGrabRadius = ''                  

        if obj.use_dynamic_topology_sculpting:
            useDyntopo = "Dyntopo: Enabled"            
        else:
            useDyntopo = "Dyntopo: Disabled"
           
        if unifiedsmooth01.use_unified_size:
            brushSmoothRadius = ("Radius: " + str(unifiedsmooth01.size))                    
        else:
            brushSmoothRadius = ("Radius: " + str(brushsmooth.size)) 
                             
        if unifiedsmooth01.use_unified_size:
            brushSmoothStrength = ("Strength: " + str(bpy.data.brushes['Smooth'].strength))            
        else:
            brushSmoothStrengths = ("Strength: " + str(brushsmooth2.strength))
           
        if unifiedgrab01.use_unified_size:
            brushGrabRadius = ("Radius: " + str(unifiedgrab01.size))                    
        else:
            brushGrabRadius = ("Radius: " + str(brushgrab.size))              
                     
        if unifiedgrab01.use_unified_size:
            brushGrabStrength = ("Strength: " + str(bpy.data.brushes['Grab'].strength))            
        else:
            brushGrabStrengths = ("Strength: " + str(brushgrab2.strength))         
        col.prop(context.scene.brush_properties, 'is_smooth_brush', text=('[1]Smooth brush'  + '| ' + brushSmoothRadius + ' | ' + brushSmoothStrength), toggle=True, icon="BRUSH_SMOOTH")
        col.prop(context.scene.brush_properties, 'is_grab_brush', text=('[2]Drag brush'+ '| '  + brushGrabRadius + ' | ' + brushGrabStrength), toggle=True, icon="BRUSH_GRAB")

And It’s look this :slight_smile:
image
When I’m changing value in Radius, also is changing in second brush.
There is possibility, that this two radius will be independend in working ?

Greets

import bpy


class BrushPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Brush Panel"
    bl_idname = "OBJECT_PT_brush"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Tools"


    def draw(self, context):

        layout = self.layout
        scene = context.scene              
        tool = scene.tool_settings   

        unified = tool.unified_paint_settings        
        unifiedSize = unified.use_unified_size
        unifiedStrength = unified.use_unified_strength
                                  
        brushsmooth = bpy.data.brushes['Smooth']  

        obj = context.object
        scn = context.scene           
      
        useDyntopo = ""
        brushSmoothStrength = ""        
        brushSmoothRadius = ""                   

        if obj.use_dynamic_topology_sculpting:
            useDyntopo = "Dyntopo: Enabled"            
        else:
            useDyntopo = "Dyntopo: Disabled"


        # Smooth Brush           
        if unifiedSize:
            brushSmoothRadius = ("Radius: " + str(unified.size))                    
        else:
            brushSmoothRadius = ("Radius: " + str(brushsmooth.size)) 
                                        
        if unifiedStrength:
            brushSmoothStrength = ("Strength: " + f"{'%.3f' % unified.strength}")                    
        else:
            brushSmoothStrength = ("Strength: " + f"{'%.3f' % brushsmooth.strength}")              
                     
        col = layout.column()                     
        col.operator("wm.tool_set_by_id", text=("[1]Smooth brush"  + " | " + brushSmoothRadius + " | " + brushSmoothStrength), icon="BRUSH_SMOOTH").name = "builtin_brush.Smooth"



def register():
    bpy.utils.register_class(BrushPanel)


def unregister():
    bpy.utils.unregister_class(BrushPanel)


if __name__ == "__main__":
    register()  

Thank You, know it’s working great.
Thank You very much for help :slight_smile:

Greets

Sorry to bring this up again. Maybe you know how to make both places show mm if you set the units on the scene preference ?
image
image
And there is a problem with updating value in brush button. This button isn’t working properly when I swith in brush settings to Radius Units to Scene.
Can You help me last time ?
Greets and one more time thanks for help :slight_smile: