diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2005-01-13 06:04:12 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2005-01-13 06:04:12 +0300 |
commit | 9f43accdb2319b567551f652a6966a5fa56f086b (patch) | |
tree | c19431b0a9cbed1ffa6af17b020705c59f766efc /source/blender/python/api2_2x/Lattice.c | |
parent | 5161998bbe2c76df281a920e96523298e5e8baa6 (diff) |
BPython:
- patch by Jonathan Merritt: new function Blender.Draw.Image() + its doc;
- patch by Campbell Barton: .users attribute for many types;
- tiny internal change in nmesh.hasVertexUV() method.
Thanks to Jonathan and Campbell for the patches and the patience!
Diffstat (limited to 'source/blender/python/api2_2x/Lattice.c')
-rw-r--r-- | source/blender/python/api2_2x/Lattice.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Lattice.c b/source/blender/python/api2_2x/Lattice.c index e10755f28ec..c4dc04a4747 100644 --- a/source/blender/python/api2_2x/Lattice.c +++ b/source/blender/python/api2_2x/Lattice.c @@ -804,12 +804,15 @@ static PyObject *Lattice_getAttr( BPy_Lattice * self, char *name ) attr = Py_BuildValue( "i", self->Lattice->pntsu * self->Lattice->pntsv * self->Lattice->pntsw ); + } else if( strcmp( name, "users" ) == 0 ) { + attr = PyInt_FromLong( self->Lattice->id.us ); + } else if( strcmp( name, "__members__" ) == 0 ) attr = Py_BuildValue( "[s,s,s,s,s,s,s,s,s]", "name", "width", "height", "depth", "widthType", "heightType", "depthType", "mode", - "latSize" ); - + "latSize", "users" ); + if( !attr ) return ( EXPP_ReturnPyObjError( PyExc_MemoryError, "couldn't create PyObject" ) ); |