5
$\begingroup$

I want to change the blend mode of all the materials in my scene at once and the only way that I think this would be possible is Python script but I simply have no idea how as I've never written a single line of python before...

import bpy

bpy.context.object.active_material.blend_method = 'OPAQUE'

This is what I currently have. How do I make it refer to all materials in the scene and not just the active one?

$\endgroup$

1 Answer 1

5
$\begingroup$
import bpy
mats = bpy.data.materials

for mat in mats:
    mat.blend_method = 'OPAQUE'

Link to the relevant class in the docs

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .