Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuho Vepsalainen <bebraw@gmail.com>2007-05-03 19:10:44 +0400
committerJuho Vepsalainen <bebraw@gmail.com>2007-05-03 19:10:44 +0400
commitc71949419ed68ef1026b4ac7ac391a51ce055ae8 (patch)
tree910871aaad78fc88a53fb2213dbcc58f2a49522c /source/blender/python/api2_2x/Image.c
parent7c5c0db23dc6b35d3e26129b2fc1764c859b80b4 (diff)
== UV/Image Editor ==
Patch #6570. This patch adds color and alpha selectors to Image -> "New..." dialog.
Diffstat (limited to 'source/blender/python/api2_2x/Image.c')
-rw-r--r--source/blender/python/api2_2x/Image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c
index 60ac0f6c5c9..449ebcdfa7a 100644
--- a/source/blender/python/api2_2x/Image.c
+++ b/source/blender/python/api2_2x/Image.c
@@ -235,6 +235,7 @@ static PyObject *M_Image_New( PyObject * self, PyObject * args)
{
int width, height, depth;
char *name;
+ float color[] = {0, 0, 0, 1};
Image *image;
if( !PyArg_ParseTuple( args, "siii", &name, &width, &height, &depth ) )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
@@ -242,7 +243,7 @@ static PyObject *M_Image_New( PyObject * self, PyObject * args)
if (width > 5000 || height > 5000 || width < 1 || height < 1)
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"Image width and height must be between 1 and 5000" ) );
- image = BKE_add_image_size(width, height, name, 0);
+ image = BKE_add_image_size(width, height, name, 0, color);
if( !image )
return ( EXPP_ReturnPyObjError( PyExc_MemoryError,
"couldn't create PyObject Image_Type" ) );