User input to change materials properties
Annotate your operator.
Add properties to the operator containing the defaults to set, which can in themselves be set.
Have added the only the metallic property, and a draw method,

add more to suit.
import bpy
from bpy.props import FloatProperty

class ResetAllMaterialsOperator(bpy.types.Operator):
    &quot;&quot;&quot;Affects all Materials in the scene&quot;&quot;&quot;
    bl_idname = &quot;material.reset_all_materials_operator&quot;
    bl_label = &quot;Reset all Materials&quot;
    bl_options = {'REGISTER', 'UNDO'}

    metallic = FloatProperty(
            name=&quot;Metallic&quot;,
            default=0.75,
            )
    
    def draw(self, context):
        self.layout.prop(self, &quot;metallic&quot;)
           
    def execute(self, context):
        for mat in bpy.data.materials:
            if mat.use_nodes:
                for n in mat.node_tree.nodes:
                    if n.type == &quot;BSDF_PRINCIPLED&quot; and n.label == &quot;&quot;:


                        n.inputs[4].default_value = self.metallic
                        n.inputs[5].default_value = 0.1
                        n.inputs[7].default_value = 0.5

                        for l in mat.node_tree.links:
                            if l.from_node.type == &quot;TEX_IMAGE&quot; and l.to_node.type == &quot;BSDF_PRINCIPLED&quot;:
                                if l.to_socket.identifier == &quot;Alpha&quot;:
                                    mat.node_tree.links.remove(l)
                        break

        return {'FINISHED'}


class TestPanel(bpy.types.Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_idname = &quot;TEST_PT_test&quot;
    bl_category = &quot;TEST 2&quot;
    bl_label = &quot;Test label&quot;

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

        box = layout.box()
        row = box.column()
        row.operator(&quot;material.reset_all_materials_operator&quot;)

classes = (TestPanel,  ResetAllMaterialsOperator)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)


def unregister():
    for cls in reversed(classes):
        bpy.utils.unregister_class(cls)


if __name__ == &quot;__main__&quot;:
    register()