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-09-30 18:14:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-09-30 18:14:49 +0400
commit32b1e2383bf50ebe30c26618496ec966620d1d23 (patch)
tree373e50c9d290f46ba33096821cf17ba54003d8ed /source/blender/python/api2_2x/Lattice.c
parent8e7b4039247419a34093b06b5a05c2423d2cab05 (diff)
3rd attempt to commit, metaball fixes and small vector optimization
Diffstat (limited to 'source/blender/python/api2_2x/Lattice.c')
-rw-r--r--source/blender/python/api2_2x/Lattice.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/python/api2_2x/Lattice.c b/source/blender/python/api2_2x/Lattice.c
index a85a69c4be2..cceb536efd7 100644
--- a/source/blender/python/api2_2x/Lattice.c
+++ b/source/blender/python/api2_2x/Lattice.c
@@ -592,7 +592,7 @@ static PyObject *Lattice_getMode( BPy_Lattice * self )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"bad mode type..." );
- return Py_BuildValue( "s", type );
+ return PyString_FromString( type );
}
static PyObject *Lattice_setPoint( BPy_Lattice * self, PyObject * args )
@@ -822,51 +822,51 @@ static PyObject *Lattice_getAttr( BPy_Lattice * self, char *name )
if( strcmp( name, "name" ) == 0 )
attr = PyString_FromString( self->Lattice->id.name + 2 );
else if( strcmp( name, "width" ) == 0 )
- attr = Py_BuildValue( "i", self->Lattice->pntsu );
+ attr = PyInt_FromLong( self->Lattice->pntsu );
else if( strcmp( name, "height" ) == 0 )
- attr = Py_BuildValue( "i", self->Lattice->pntsv );
+ attr = PyInt_FromLong( self->Lattice->pntsv );
else if( strcmp( name, "depth" ) == 0 )
- attr = Py_BuildValue( "i", self->Lattice->pntsw );
+ attr = PyInt_FromLong( self->Lattice->pntsw );
else if( strcmp( name, "widthType" ) == 0 ) {
if( self->Lattice->typeu == 0 )
- attr = Py_BuildValue( "s", "Linear" );
+ attr = PyString_FromString( "Linear" );
else if( self->Lattice->typeu == 1 )
- attr = Py_BuildValue( "s", "Cardinal" );
+ attr = PyString_FromString( "Cardinal" );
else if( self->Lattice->typeu == 2 )
- attr = Py_BuildValue( "s", "Bspline" );
+ attr = PyString_FromString( "Bspline" );
else
return EXPP_ReturnPyObjError( PyExc_ValueError,
"bad widthType..." );
} else if( strcmp( name, "heightType" ) == 0 ) {
if( self->Lattice->typev == 0 )
- attr = Py_BuildValue( "s", "Linear" );
+ attr = PyString_FromString( "Linear" );
else if( self->Lattice->typev == 1 )
- attr = Py_BuildValue( "s", "Cardinal" );
+ attr = PyString_FromString( "Cardinal" );
else if( self->Lattice->typev == 2 )
- attr = Py_BuildValue( "s", "Bspline" );
+ attr = PyString_FromString( "Bspline" );
else
return EXPP_ReturnPyObjError( PyExc_ValueError,
"bad widthType..." );
} else if( strcmp( name, "depthType" ) == 0 ) {
if( self->Lattice->typew == 0 )
- attr = Py_BuildValue( "s", "Linear" );
+ attr = PyString_FromString( "Linear" );
else if( self->Lattice->typew == 1 )
- attr = Py_BuildValue( "s", "Cardinal" );
+ attr = PyString_FromString( "Cardinal" );
else if( self->Lattice->typew == 2 )
- attr = Py_BuildValue( "s", "Bspline" );
+ attr = PyString_FromString( "Bspline" );
else
return EXPP_ReturnPyObjError( PyExc_ValueError,
"bad widthType..." );
} else if( strcmp( name, "mode" ) == 0 ) {
if( self->Lattice->flag == 1 )
- attr = Py_BuildValue( "s", "Grid" );
+ attr = PyString_FromString( "Grid" );
else if( self->Lattice->flag == 3 )
- attr = Py_BuildValue( "s", "Outside" );
+ attr = PyString_FromString( "Outside" );
else
return EXPP_ReturnPyObjError( PyExc_ValueError,
"bad mode..." );
} else if( strcmp( name, "latSize" ) == 0 ) {
- attr = Py_BuildValue( "i", self->Lattice->pntsu *
+ attr = PyInt_FromLong( self->Lattice->pntsu *
self->Lattice->pntsv *
self->Lattice->pntsw );
} else if( strcmp( name, "users" ) == 0 ) {