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/Lamp.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/Lamp.c')
-rw-r--r-- | source/blender/python/api2_2x/Lamp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c index bb84c766a56..0e9935d0c78 100644 --- a/source/blender/python/api2_2x/Lamp.c +++ b/source/blender/python/api2_2x/Lamp.c @@ -1311,7 +1311,9 @@ static PyObject *Lamp_getAttr( BPy_Lamp * self, char *name ) attr = PyFloat_FromDouble( self->lamp->att1 ); else if( strcmp( name, "quad2" ) == 0 ) attr = PyFloat_FromDouble( self->lamp->att2 ); - + else if( strcmp( name, "users" ) == 0 ) + attr = PyInt_FromLong( self->lamp->id.us ); + else if( strcmp( name, "Types" ) == 0 ) { attr = Py_BuildValue( "{s:h,s:h,s:h,s:h,s:h,s:h}", "Lamp", EXPP_LAMP_TYPE_LAMP, @@ -1336,16 +1338,16 @@ static PyObject *Lamp_getAttr( BPy_Lamp * self, char *name ) EXPP_LAMP_MODE_NODIFFUSE, "NoSpecular", EXPP_LAMP_MODE_NOSPECULAR ); } - + else if( strcmp( name, "__members__" ) == 0 ) { /* 23 entries */ attr = Py_BuildValue - ( "[s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s]", + ( "[s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s]", "name", "type", "mode", "samples", "bufferSize", "haloStep", "R", "G", "B", "energy", "dist", "spotSize", "spotBlend", "clipStart", "clipEnd", "bias", "softness", "haloInt", "quad1", "quad2", - "Types", "Modes", "col" ); + "Types", "Modes", "col", "users" ); } if( !attr ) |