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>2007-06-16 17:17:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-06-16 17:17:41 +0400
commit84749aa3ff39af08cdccfea462fb4a6a266ca7b8 (patch)
tree63954fcd3eb073fe8e057974f750c641b6d17bfd /source/blender/python/api2_2x/Texture.c
parent3e490c020324dcd4d7a3a3acd62f48d3fd781afc (diff)
Python API, more METH_VARARGS to METH_O
Diffstat (limited to 'source/blender/python/api2_2x/Texture.c')
-rw-r--r--source/blender/python/api2_2x/Texture.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c
index 607ff6fe008..82fbb262a1b 100644
--- a/source/blender/python/api2_2x/Texture.c
+++ b/source/blender/python/api2_2x/Texture.c
@@ -498,7 +498,7 @@ static int Texture_setNoiseBasis2( BPy_Texture *self, PyObject *args,
static PyObject *Texture_getColorband( BPy_Texture * self);
int Texture_setColorband( BPy_Texture * self, PyObject * value);
-static PyObject *Texture_evaluate( BPy_Texture *self, PyObject *args );
+static PyObject *Texture_evaluate( BPy_Texture *self, VectorObject *vec_in );
static PyObject *Texture_copy( BPy_Texture *self );
/*****************************************************************************/
@@ -542,7 +542,7 @@ static PyMethodDef BPy_Texture_methods[] = {
"(s) - Set Dist Noise"},
{"setDistMetric", ( PyCFunction ) Texture_oldsetDistMetric, METH_VARARGS,
"(s) - Set Dist Metric"},
- {"evaluate", ( PyCFunction ) Texture_evaluate, METH_VARARGS,
+ {"evaluate", ( PyCFunction ) Texture_evaluate, METH_O,
"(vector) - evaluate the texture at this position"},
{"__copy__", ( PyCFunction ) Texture_copy, METH_NOARGS,
"() - return a copy of the the texture"},
@@ -2704,14 +2704,13 @@ int Texture_setColorband( BPy_Texture * self, PyObject * value)
return EXPP_Colorband_fromPyList( &self->texture->coba, value );
}
-static PyObject *Texture_evaluate( BPy_Texture * self, PyObject * args )
+static PyObject *Texture_evaluate( BPy_Texture * self, VectorObject * vec_in )
{
- VectorObject *vec_in = NULL;
TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
float vec[4];
/* int rgbnor; dont use now */
- if(!PyArg_ParseTuple(args, "O!", &vector_Type, &vec_in) || vec_in->size < 3)
+ if(!VectorObject_Check(vec_in) || vec_in->size < 3)
return EXPP_ReturnPyObjError(PyExc_TypeError,
"expects a 3D vector object");