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:
authorCampbell Barton <ideasman42@gmail.com>2006-12-27 08:04:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-12-27 08:04:20 +0300
commit9afe662c125fec5cf62b3976bf32194838f0d740 (patch)
tree97fc847b9379eef836801dcafad0cd92e38cb371 /source/blender/python/api2_2x/Texture.c
parented2f161c72722b90a1c4e15f998ca678b79e94b0 (diff)
renameing datablocks was imposing a name limit on the python side.
This isnt needed because the limit is alredy being set by rename_id() some other minor changed- use None returning maro
Diffstat (limited to 'source/blender/python/api2_2x/Texture.c')
-rw-r--r--source/blender/python/api2_2x/Texture.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c
index 8d94632e70f..5fdfc7cfaea 100644
--- a/source/blender/python/api2_2x/Texture.c
+++ b/source/blender/python/api2_2x/Texture.c
@@ -1891,8 +1891,7 @@ static int Texture_setDistMetric( BPy_Texture * self, PyObject * value )
return EXPP_ReturnPyObjError( PyExc_ValueError,
"invalid dist metric type" );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
#else
return EXPP_setIValueRange ( value, &self->texture->vn_distm,
TEX_DISTANCE,
@@ -1946,10 +1945,8 @@ static PyObject *Texture_getIpo( BPy_Texture * self )
{
struct Ipo *ipo = self->texture->ipo;
- if( !ipo ) {
- Py_INCREF( Py_None );
- return Py_None;
- }
+ if( !ipo )
+ Py_RETURN_NONE;
return Ipo_CreatePyObject( ipo );
}
@@ -1996,7 +1993,7 @@ static int Texture_setIpo( BPy_Texture * self, PyObject * value )
self->texture->ipo = ipo;
if ( ipo ) {
id = &ipo->id;
- id_us_plus(id); //id->us++;
+ id_us_plus(id);
}
return 0;
@@ -2554,8 +2551,7 @@ static PyObject *Texture_oldsetType( BPy_Texture * self, PyObject * args )
self->texture->env->object= OBACT;
}
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Texture_oldsetExtend( BPy_Texture * self, PyObject * args )
@@ -2570,8 +2566,7 @@ static PyObject *Texture_oldsetExtend( BPy_Texture * self, PyObject * args )
return EXPP_ReturnPyObjError( PyExc_ValueError,
"invalid extend mode" );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
/*
@@ -2600,8 +2595,7 @@ static PyObject *Texture_oldsetNoiseBasis( BPy_Texture * self, PyObject * args )
return EXPP_ReturnPyObjError( PyExc_ValueError,
"invalid noise basis" );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Texture_oldsetDistNoise( BPy_Texture * self, PyObject * args )
@@ -2618,8 +2612,7 @@ static PyObject *Texture_oldsetDistNoise( BPy_Texture * self, PyObject * args )
return EXPP_ReturnPyObjError( PyExc_ValueError,
"invalid noise basis" );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Texture_oldsetSType( BPy_Texture * self, PyObject * args )
@@ -2648,8 +2641,7 @@ static PyObject *Texture_oldsetSType( BPy_Texture * self, PyObject * args )
return EXPP_ReturnPyObjError( PyExc_ValueError,
"invalid texture stype" );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Texture_oldsetDistMetric( BPy_Texture * self, PyObject * args )
@@ -2667,8 +2659,7 @@ static PyObject *Texture_oldsetDistMetric( BPy_Texture * self, PyObject * args )
return EXPP_ReturnPyObjError( PyExc_ValueError,
"invalid dist metric type" );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Texture_oldsetImageFlags( BPy_Texture * self, PyObject * args )
@@ -2699,7 +2690,6 @@ static PyObject *Texture_oldsetImageFlags( BPy_Texture * self, PyObject * args )
self->texture->imaflag = (short)flag;
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}