diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-02-25 04:07:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-02-25 04:07:28 +0300 |
commit | 75147698e2b8765022097203b9bb1291a105f2d8 (patch) | |
tree | a74dc1f9874be70936a5faf73811c91e17ee99be /source/blender/python/api2_2x/gen_utils.c | |
parent | f791672e76f90b360920c0d644d1f15f87dbd0e4 (diff) |
Scene
* Moved to getsetattrs
* added scene.users (get)
* added scene.fakeUser (get/set)
* added scene.world (get/set)
* added scene.timeline (get)
* added scene.render (get)
* added scene.radiosity (get)
* added scene.objects.camera (get/set)
Group
* added properties
gen_utils
* made getScriptLinks work as documented, return an empty list rather then None.
header files, noted libdata after PyObject as a requirement.
Others,
* Deprecate prints for older functionality
EpyDocs still need updating.
Diffstat (limited to 'source/blender/python/api2_2x/gen_utils.c')
-rw-r--r-- | source/blender/python/api2_2x/gen_utils.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/gen_utils.c b/source/blender/python/api2_2x/gen_utils.c index 01cf7c461bc..894e7e55f23 100644 --- a/source/blender/python/api2_2x/gen_utils.c +++ b/source/blender/python/api2_2x/gen_utils.c @@ -453,15 +453,16 @@ PyObject *EXPP_getScriptLinks( ScriptLink * slink, PyObject * args, char *eventname = NULL; int i, event = 0; - /* actually !scriptlink shouldn't happen ... */ - if( !slink || !slink->totscript ) - return EXPP_incr_ret( Py_None ); + list = PyList_New( 0 ); if( !PyArg_ParseTuple( args, "s", &eventname ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected event name (string) as argument" ); - list = PyList_New( 0 ); + /* actually !scriptlink shouldn't happen ... */ + if( !slink || !slink->totscript ) + return list; + if( !list ) return EXPP_ReturnPyObjError( PyExc_MemoryError, "couldn't create PyList!" ); |