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:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-01-13 06:04:12 +0300
committerWillian Padovani Germano <wpgermano@gmail.com>2005-01-13 06:04:12 +0300
commit9f43accdb2319b567551f652a6966a5fa56f086b (patch)
treec19431b0a9cbed1ffa6af17b020705c59f766efc /source/blender/python/api2_2x/Lamp.c
parent5161998bbe2c76df281a920e96523298e5e8baa6 (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.c10
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 )