0
$\begingroup$

This question already has an answer here:

I would like to create a new image texture and define its name and size entirely via Python. The closest I can get is to generate the popup window where I change these parameters. I can't seem to find the answer anywhere. Is this possible?

I'm trying to create a script that auto-bakes a color ID map, tied into a single fat "Bake" button. I want the image texture's name and size to be predefined when generated.

$\endgroup$

marked as duplicate by p2or, Denis, JakeD, David Feb 11 '17 at 22:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
$\begingroup$

Ah, nevermind! I found the answer almost immediately after posting.

bpy.data.images.new("StringName", 1024, 1024)

...I wasted an hour looking for this simple answer...

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.