0
$\begingroup$

I was trying to automate the process of adding an image in the image editor through python. Well i kind of succeeded, but only in changing the resolution and not the color/alpha values. I seem to be lost at this part, i want the alpha value of the image to be 0 and i cant seem to find a way to automate that through python.

enter image description here

How can i change the alpha value of the image im adding through python ?

$\endgroup$
1
  • 2
    $\begingroup$ Please post code as text. $\endgroup$
    – batFINGER
    Commented Sep 20, 2017 at 4:29

1 Answer 1

4
$\begingroup$

Color is a parameter of bpy.ops.image.new():

bpy.ops.image.new(name="Untitled", width=1024, height=1024, color=(0.0, 0.0, 0.0, 1.0), alpha=True, generated_type='BLANK', float=False, gen_context='NONE', use_stereo_3d=False)

bpy.ops.image.new in API

$\endgroup$

You must log in to answer this question.

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