0

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.

David
  • 49,291
  • 38
  • 159
  • 317
allen
  • 1,019
  • 4
  • 17
  • 26

1 Answers1

0

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...

allen
  • 1,019
  • 4
  • 17
  • 26