0
$\begingroup$

i'm doing some scripting with the texture paint mode, basically calling bpy.ops.paint.project_image on multiple layers. It's working fine, except I can't figure out how to switch the image that gets painted in Single Layer mode.

Screenshot of Single Image texture slot

For example, here I want to apply paint to "Mask" and then switch it to a different image from script and apply paint to that.

How do I change what image this Texture Slot is set to from script?

Thank you!

$\endgroup$

1 Answer 1

0
$\begingroup$

Ok, I figured it out. It was image_paint.canvas, as in:

bpy.context.scene.tool_settings.image_paint.canvas = bpy.data.images["ImageName", None]

$\endgroup$

You must log in to answer this question.

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