From 5eaf9f90c1acc1b337a3fee38887f5db2a46ac81 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 8 Mar 2007 14:37:34 +0000 Subject: BPython API added a function - GenericLib_assignData for assigning blender data, to assign an ipo to a camera or world to a scene for instance. Using this function removed ~300 lines of code. also fixes user count error in some places that didnt check. also made it possible to clear the colorband by setting it to [] --- source/blender/python/api2_2x/Texture.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/python/api2_2x/Texture.c') diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c index 67120b5f6c6..1f2f54aadd3 100644 --- a/source/blender/python/api2_2x/Texture.c +++ b/source/blender/python/api2_2x/Texture.c @@ -2662,9 +2662,7 @@ static PyObject *Texture_getColorband( BPy_Texture * self) int Texture_setColorband( BPy_Texture * self, PyObject * value) { - if (!self->texture->coba) - self->texture->coba = MEM_callocN( sizeof(ColorBand), "colorband"); - return EXPP_Colorband_fromPyList( self->texture->coba, value ); + return EXPP_Colorband_fromPyList( &self->texture->coba, value ); } static PyObject *Texture_evaluate( BPy_Texture * self, PyObject * args ) -- cgit v1.2.3