Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- for obj in bpy.context.selected_objects:
- if obj.type == 'MESH':
- for slot in obj.material_slots:
- # Check if the material has a node tree
- if slot.material and slot.material.node_tree:
- principled_node = slot.material.node_tree.nodes.get("Principled BSDF")
- if principled_node:
- # Set values for the Principled BSDF shader
- principled_node.inputs[2].default_value = 1 # Roughness
- principled_node.inputs[1].default_value = 1 # Metallic
Add Comment
Please, Sign In to add comment