[Bf-committers] Image creation with dialog

Konrad Wilhelm Kleine konrad at konradwilhelm.de
Sat Jun 26 00:05:39 CEST 2010


Hi there,

I want to create an image inside my Python operator.

Currently I use this code to create a bump map for instance.

	img = bpy.data.images.new("BumpMap")

Is it possible to adjust the image type (depth, number of channels)
after the creation or can I do it before? Obviously a bump map can be a
8 Bit single channel greyscale image.

It would also be nice if the user gets the chance to adjust the size and
other parameters with the same floating dialog you can get by calling:

	layout.operator("image.new")

in your bpy.types.Panel's "draw" method. I need to pop up with this
dialog from inside my operator.

Cheers,
Konrad



More information about the Bf-committers mailing list