Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- # Check if there is an active object and if it has materials
- if bpy.context.object and bpy.context.object.material_slots:
- obj = bpy.context.object
- # Iterate over all material slots in the selected object
- for slot in obj.material_slots:
- mat = slot.material
- if mat:
- # Assign blend_method HASHED to each material
- mat.blend_method = 'HASHED'
- else:
- print("No object selected or the selected object has no materials.")
Add Comment
Please, Sign In to add comment